[Nottingham] Quick! I need a bash one liner!
Michael Erskine
msemtd at yahoo.co.uk
Tue Feb 1 15:34:16 GMT 2005
Hi all,
I'm fixing up some old C code and I want to expand the tabs in all the
files...
#!/bin/bash
for file in *.[ch]
do
expand -t 4 $file > t1
mv t1 $file
done
...I guess this probably worked (not checked yet! I'd like to grep for '\t'
but it doesn't seem to act like perl and grep -P says "not supported") but
I'm curious whether this "script" can be issued as a one-liner - anyone?
Regards,
Michael
--
You can bear anything if it isn't your own fault.
-- Katharine Fullerton Gerould
More information about the Nottingham
mailing list