[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gnumed-devel] Help with grepping
From: |
Ian Haywood |
Subject: |
Re: [Gnumed-devel] Help with grepping |
Date: |
Tue, 15 Feb 2005 08:04:08 +1100 |
User-agent: |
Mozilla Thunderbird 0.8 (X11/20041012) |
Richard Terry wrote:
If I wanted to replace one name with another, for all the files in a
directory, how do I do it??
Thanks in anticipation.
Do you mean, replace a string in all files, or in filenames?
Andreas has given an answer to the second
The first would be:
for i in `ls`; do
sed --in-place "s/oldname/newname/" $i
done
Ian
signature.asc
Description: OpenPGP digital signature