10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Need your ideas on a section of code to finish something up. To make a long story short, I'm parsing a print output file that goes to pre-printed forms. I'm intercepting it, parsing it, formatting it, cutting it up into individual pages, grabbing the text I want in zones, building an... (3 Replies)
Discussion started by: ampsys
2. Shell Programming and Scripting
I have two files file1.txt and file2.txt. Please see the attachments.
In file2.txt (which actually is a diff output between two versions of file1.txt.), I extract the pattern corresponding to 1172c1172. Now ,In file1.txt I have to search for this pattern 1172c1172 and if found, I have to... (9 Replies)
Discussion started by: saurabh kumar
3. Shell Programming and Scripting
Hello sed gurus. I am using ksh on Sun and have a file created by concatenating several other files. All files contain header rows. I just need to keep the first occurrence and remove all other header rows.
header for file
header for file
header for file... (8 Replies)
Discussion started by: gary_w
4. Shell Programming and Scripting
I've got a semicolon delimited file. I would like to search for fields that match a pattern, and not hardcoded eg "mth".
If the delimited field fulfills this condition, eg. mth=value
I would like to print out both key and value for some number comparison.
eg. if value > "12"... (5 Replies)
Discussion started by: alienated
5. UNIX for Dummies Questions & Answers
I need to search and count the occurrences of a pattern in a file. The catch here is it's a pattern and not a word ( not necessarily delimited by spaces). For eg. if ABCD is the pattern I need to search and count, it can come in all flavors like (ABCD, ABCD), XYZ.ABCD=100, XYZ.ABCD>=500,... (6 Replies)
Discussion started by: tektips
6. Shell Programming and Scripting
I am trying to do some thing like this ..
In a file , if pattern found insert new pattern at the begining of the line containing the pattern.
in a file I have this.
if i find feedthru_pin want to insert !! at the... (7 Replies)
Discussion started by: pitagi
7. Shell Programming and Scripting
I have two files viz,
$ cat rak1
$ cat rak2
sdiff rak1 rak2 returns:
I want the lines that got modified, changed, or deleted preceding with the section they are in.
I have done this so far: (1 Reply)
Discussion started by: rakeshou
8. UNIX for Dummies Questions & Answers
In a file a pattern is occured many times randomly. Even it may appear more then once in the same line too. How i can get the number of times that pattern appeared in the file? let the file name is abc.txt and the pattern is "xyz".
I used the following code:
grep -ic "xyz" abc.txt
but it is... (3 Replies)
Discussion started by: palash2k
9. Shell Programming and Scripting
I need to search for a multiple string pattern(5 key words) in a file(similar to a flat file) ,and i need to store the output in a another file .
In that file we may have mutiple occurrences of the key words.and i need only the unique.
kindly help out.
Mohana Krishnan (2 Replies)
Discussion started by: krishnan_6015@y
10. Shell Programming and Scripting
I want to search a file for a string and then if the string is found I need the line that the string is on - but also the previous two lines from the file (that the pattern will not be found in)
This is on solaris
Can you help? (2 Replies)
Discussion started by: frustrated1