Help, how to replace string in multiple files 
Author Message
 Help, how to replace string in multiple files

Hi,

I am new in the Unix/Linux world and I have a task to replace some
string of files in a directory(with sub-directories).

Please enlight me how to do in with awk.  Could I just write a awk
script to do it, please show me examples.

Thanks in advance for any ideas and input.

Wing



Mon, 18 Apr 2005 22:11:54 GMT  
 Help, how to replace string in multiple files

Quote:

> Hi,

> I am new in the Unix/Linux world and I have a task to replace some
> string of files in a directory(with sub-directories).

> Please enlight me how to do in with awk.  Could I just write a awk
> script to do it, please show me examples.

sed is your friend in this case.

sed 's/find_this/replace_with_this/g' < file



Tue, 19 Apr 2005 07:06:11 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Help: Replacing the first occurrence of a string in a file

2. Multiple string.replace in one run

3. Multiple Dispatch (was Re: Replacing Multiple Inheritance with Java's Interfaces)

4. string.replace() can't replace newline characters???

5. Replacing a string from an input file within awk script

6. searching and replacing a string within a file with rexx

7. Replace strings in file of unknown format

8. How to replace a string in a file?

9. Problem With Replacing Strings in a File

10. sed help needed - replacing parts of a string

11. How to replace or create a file using the open/create/replace.vi

12. Help on opening multiple input files(test vector files)

 

 
Powered by phpBB® Forum Software