[Nottingham] Quick! I need a bash one liner!

Johannes Kling jok at printk.net
Tue Feb 1 21:37:56 GMT 2005


> Full marks Jo! I guess that's "perldoc -q tabs".  

perldoc -q expand, actually, with some modifications.


> for file in *.[ch]; do expand -t 4 $file > t1; mv t1 $file; done
Isn't that just your original script re-written using ';' instad of
newlines? I.e. No more of a one-liner than:
--
#include <stdio.h>
int main(void) { printf("Hello World\n"); return 0; }
--
is generally considered to be a two-liner?

Regards,
  Jo

-- 
"I shall press on valiantly in the face of apathy!" -- cmg




More information about the Nottingham mailing list