10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have a file containing list of strings like
i:
Pink
Yellow
Green
and I have file having list of file names in a directory
j :
a
b
c
d
Where j contains of a ,b,c,d are as follows
a:
Pink (3 Replies)
Discussion started by: madabhg
3 Replies
2. Shell Programming and Scripting
I need help.
I have to delete multiple directories inside a directory that are two weeks old.
Example: Today is July 09, 2012
Folder1 > folder1 (created June 4, 2012) -- should be deleted
> folder2 (created June 2, 2012) -- should be deleted
> folder3 (created... (4 Replies)
Discussion started by: jasperux
4 Replies
3. Shell Programming and Scripting
I need to update about 2400 files in a directory subtree, with a new directory path inside the files
I need to change this occurence in all files: /d2/R12AB/VIS/apps/tech_st/10.1.2
with this: /u01/PROD/apps/apps_st/10.1.3
I know how to change single words using "find . -type f -print0 |... (6 Replies)
Discussion started by: wicus
6 Replies
4. Shell Programming and Scripting
can anyone please help me in the below scenario:
File1:
Hello1
Hello1
i want to use sed to replace multiple occurances of Hello1 in file 1 to welcome.
Thanks a ton for the help (9 Replies)
Discussion started by: amithkhandakar
9 Replies
5. Shell Programming and Scripting
I need to replace (delete) a text block in a bunch of files, its a html table, almost at the end of pages but the location varies.
In Windows I used Filemonkey, but nothing like that in Unix?
There is replace from mysql, but how does it deal with newlines?
sed only works with single lines,... (6 Replies)
Discussion started by: eiland
6 Replies
6. UNIX for Dummies Questions & Answers
I need to replace a piece of text in many files, recursively, in a way that doesn't duplicate the files. How would I do that?
The closest I've come is
grep -rl "text" * | sed -e 's/home1/home2/g'
but that just replaces the filename. (2 Replies)
Discussion started by: dhinge
2 Replies
7. Shell Programming and Scripting
Dear all
My task is to replace a strings in multiple files.
filename: file1
I can use sed to replace abc.server.com to unix.server.org
e.g. sed 's/abc.server.com/unix.server.org/g file1 > newfile1
I have 2 questions. How do I
directly save file1 instead of append to newfile1. I... (1 Reply)
Discussion started by: on9west
1 Replies
8. Shell Programming and Scripting
Ok guys,
If anyone could help me out on this puppy I'd be very appreciative!
Here's the scenario
I have a string for example :
<img src=BLANK_IMG border=0 width=221 height=12>
or
<img src=IMG border=0 height=12 width=221 >
or anything else really....
need to basically change each... (10 Replies)
Discussion started by: Tonka52
10 Replies
9. Shell Programming and Scripting
I would like to know code that will delete multiple text from a comma delimited file. For example, how would the comma delimited file below delete the word 'PEST' in Perl language (previously an excel file that was converted to a csv and the last column was PEST):
1, 2,43,34, bosx,PEST
1,... (1 Reply)
Discussion started by: dolo21taf
1 Replies
10. Shell Programming and Scripting
Hello all
I need to search and replace in multiple files that are in directory hierarchy
Im using the :
find . -name "*.dsp" -print | xargs grep -n -o Test.lib" , I like to be able to replace every instance of Test.lib
with empty space .
how can I write one liner that does this ? (3 Replies)
Discussion started by: umen
3 Replies