help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: expand tabs in a shell


From: Bruce Ingalls
Subject: Re: expand tabs in a shell
Date: Tue, 17 Feb 2004 13:20:01 GMT
User-agent: Mozilla Thunderbird 0.5 (Windows/20040207)

David Rasmussen wrote:
Joakim Hove wrote:
how about redirection: expand file > tmp_file ; mv tmp_file file

Sure, but that doesn't solve the problem with batch runs. I can't do

expand *.cpp

which would have been very easy.

#!/bin/zsh
#or choose a sufficiently powerful shell, such as bash

for file in *.cpp
do
 expand $file > tmp_file
 mv tmp_file $file
done

#See also nntp://comp.unix.shell


reply via email to

[Prev in Thread] Current Thread [Next in Thread]