TABs (was: Waffling between Python and Ruby)
Huaiyu Zhu
hzhu at knowledgetrack.com
Wed Jun 21 19:39:33 EDT 2000
Thanks a lot. It really helps.
On 18 Jun 2000 16:29:37 GMT, Kai Großjohann
<Kai.Grossjohann at CS.Uni-Dortmund.DE> wrote:
>hzhu at mars.localdomain (Huaiyu Zhu) writes:
>
>> This is simple to do for one file, but not for many files. I'd prefer
>> running something in batch mode on a list of files.
>
>There are Unix programs `expand' and `unexpand'. Presumably, running
>the following commands on a file foo would change tab stops from 4 to
>8:
>
> expand -4 foo > foo.new
> unexpand -8 foo.new > foo
> rm -f foo.new
>
>You could easily do this in a loop:
>
> for f in *.c
> do
> expand -4 $f > $f.new
> unexpand -8 $f.new > $f
> rm -f $f.new
> done
>
>Does this help?
>
>kai
--
Huaiyu Zhu hzhu at users.sourceforge.net
Matrix for Python Project http://MatPy.sourceforge.net
More information about the Python-list
mailing list