[seqfan] Re: sed command to convert leading spaces to dots in Python/Sage programs
boblyonsnj at gmail.com
Sat Mar 12 14:43:23 CET 2016
And the following sed command will convert the leading dots back into
sed -e ':again' -e 's/^\(\.*\)[.]\([^.]\)/\1 \2/; t again'
On Fri, Mar 11, 2016 at 11:57 PM, Bob Lyons <boblyonsnj at gmail.com> wrote:
> My friend Paul Staniforth wrote the following sed command, which can be
> used to convert leading spaces into dots in Python/Sage programs:
> sed -e ':again' -e 's/^\( *\)[ ]\([^ ]\)/\1.\2/; t again' program.py
> I've tested it on Mac, Ubuntu and Redhat.
> I took the liberty of adding this command to the following wiki page:
More information about the SeqFan