[seqfan] sed command to convert leading spaces to dots in Python/Sage programs

Bob Lyons boblyonsnj at gmail.com
Sat Mar 12 05:57:48 CET 2016


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:


https://oeis.org/w/index.php?title=Style_Sheet&stable=0&shownotice=1#Programs

Thanks,

Bob



More information about the SeqFan mailing list