10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need to match for the pattern '.py' in my file and print the word which contains.
a b 3 4.py 5 6
a b.py c.py 4 5 6 7 8
1.py 2.py 3 4 5 6
1.py 2.py (3 Replies)
Discussion started by: Sumanthsv
2. Shell Programming and Scripting
I have the below plain text file where i have some result, in order to mail that result in html table format I have written the below script and its working well. cat result.txt
Page 2015-01-01 2000
Colors 2015-02-01 3000
Landing 2015-03-02 4000
#!/bin/sh LOG=/tmp/maillog.txt... (1 Reply)
Discussion started by: close2jay
3. UNIX for Dummies Questions & Answers
Thanks for taking the time to view this!
I want to grep out all lines of a file that starts with pattern 1 but also does not match with the second pattern.
Drink a soda
Eat a banana
Eat multiple bananas
Drink an apple juice
Eat an apple
Eat multiple apples
I... (8 Replies)
Discussion started by: demmel
4. Shell Programming and Scripting
The sample file:
I want to match by '/^dept2.*/' but don't want to have substring 'dept2:' in output. How to compose such regex? (8 Replies)
Discussion started by: urello
5. Shell Programming and Scripting
I'm using the following code to extract the lines(and redirect them to a txt file) after the pattern match. But the output is inclusive of the line with pattern match.
Which option is to be used to exclude the line containing the pattern?
sed -n '/Conn.*User/,$p' > consumers.txt (11 Replies)
Discussion started by: essem
6. UNIX for Dummies Questions & Answers
I am trying to get a result out of this but fails please help. Have two files /tmp/1 & /tmp/hosts.
I want this result in /tmp/hosts if hostname is already there dont want duplicate entry.
... (5 Replies)
Discussion started by: rajeshwebspere
7. Shell Programming and Scripting
I'm looking to use AWK to pattern match lines in XML file - Example patten for below sample would be /^<apple>/
The sample I wrote out is very basic compared to what I am actually working with but it will get me started
I would like to keep the matched line(s) unchanged but have them... (4 Replies)
Discussion started by: rhoderidge
8. UNIX for Dummies Questions & Answers
My requirement is to search for a paritcular string from a group of .gz files and to print the lines containing that string and the name of the files in which that string is present.
Daily 500 odd .gz files will be generated in a directory(directory name will be in the form of... (4 Replies)
Discussion started by: krao
9. Shell Programming and Scripting
I'm looking for some help. I have a file (very long) that is organized like below:
0 283nt, >01_FRYJ6ZM12HMXZS... at +/99%
1 279nt, >01_FRYJ6ZM12HN12A... at +/99%
2 281nt, >01_FRYJ6ZM12HM4TS... at +/99%
3 283nt, >01_FRYJ6ZM12HM946... at +/99%
4 279nt,... (4 Replies)
Discussion started by: d.chauliac
10. Shell Programming and Scripting
I have file 1.txt with following entries as shown:
In file 2.txt I have the following entries as shown:
0233654|122555|10.20.30.50|023365433... (4 Replies)
Discussion started by: imas