10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I am able to grep multiple patterns which stored in a files. However, how could we replace the whole line with either the pattern or new string?
For example:
pattern_file: *Info in the () is not part of the pattern file. They are the intended name to replace the whole line after the pattern... (5 Replies)
Discussion started by: wxboo
5 Replies
2. Shell Programming and Scripting
I have a big xmltv file with many lines like:
<?xml version="1.0" encoding="UTF-8"?>
<tv>
<channel id="channel 1 +3HD">
<display-name lang="it">channel +3HD</display-name>
<icon src="http://mywebsite.com/dsgbnjfdc65657/channel +3HD.png" />
... (8 Replies)
Discussion started by: Tapiocapioca
8 Replies
3. UNIX for Beginners Questions & Answers
I'm facing a problem
1) I got a list_file intended to be used for inlace replacement like this
Replacement pattern ; Matching patterns
EXTRACT ___________________
toto ; tutu | tata | tonton | titi
bobo ; bibi | baba | bubu | bebe
etc. 14000 lines !!!
... (5 Replies)
Discussion started by: mpvphd
5 Replies
4. Shell Programming and Scripting
Hello.
For a given folder, I want to select any files find $PATH1 -f \( -name "*" but omit any files like pattern name ! -iname "*.jpg" ! -iname "*.xsession*" ..... \) and also omit any subfolder like pattern name -type d \( -name "/etc/gconf/gconf.*" -o -name "*cache*" -o -name "*Cache*" -o... (2 Replies)
Discussion started by: jcdole
2 Replies
5. Shell Programming and Scripting
Hi Team
I have the following text in one of the file
j1738-abc-system_id(in.value1)-2838 G566-deF-system_id(in.value2)-7489
I want to remove system_id(...) combination completely The output should look like this
j1738-abc-in.value1-2838 G566-deF-in.value2-7489
Any help is appreciated... (4 Replies)
Discussion started by: Thierry Henry
4 Replies
6. Shell Programming and Scripting
Hi Bigshots,
I have a pattern file with two columns. I have another data file. If column 1 in the pattern file appears as the 4th column in the data file, I need to replace it (4th column of data file) with column 2 of the pattern file. If the pattern is found in any other column, it should not... (6 Replies)
Discussion started by: ss112233
6 Replies
7. Shell Programming and Scripting
Hi all,
I here have a file which contains a list of files inside, all of which have the suffix ".log".
And now I would wish to replace all the pattern ".log" with ".log.bz2" there. So how could I archive this?
Thanks (4 Replies)
Discussion started by: isaacniu
4 Replies
8. Shell Programming and Scripting
Hi everyone,
I am trying to retrieve certain log from a big file. The log size can be from 200 - 600 lines. I have 3 search patterns, out of which 2 (first and last lines) search patterns are common for all the transactions but 3rd search pattern (occurs in the middle of transaction) is... (5 Replies)
Discussion started by: msrayudu
5 Replies
9. UNIX for Dummies Questions & Answers
This should be somewhat simple, but I need some help with this one.
I have a bunch of files with tags on the end like so...
Filename {tag1}.ext
Filename2 {tag1} {tag2}.ext
I want to hold in a variable just the filename with all the " {tag}" removed. The tag can be anything so I'm looking... (4 Replies)
Discussion started by: kerppz
4 Replies
10. Shell Programming and Scripting
Hi Gurus,
I have a file say for ex. file1 which has 3500 lines in it which are different account numbers and another file (file2) which has 230000 lines in it. I want to read all the lines in file1 and delete all those lines from file2 which has that same pattern as in file1. I am not quite... (4 Replies)
Discussion started by: toms
4 Replies