10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I have this fileA
TEST FILE ABC
this file contains ABC;
TEST FILE DGHT this file contains DGHT;
TEST FILE 123
this file contains ABC,
this file contains DEF,
this file contains XYZ,
this file contains KLM
;
I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Discussion started by: vbabz
2 Replies
2. Shell Programming and Scripting
In the awk below I am trying to output those lines that Match between file1 and file2, those Missing in file1, and those missing in file2. Using each $1,$2,$4,$5 value as a key to match on, that is if those 4 fields are found in both files the match, but if those 4 fields are not found then missing... (0 Replies)
Discussion started by: cmccabe
0 Replies
3. Shell Programming and Scripting
Hi
I need to egrep patterns in a file and limit number of matches to print for each matched pattern.
-m10 option is not working out in my sun solaris 5.10
Please guide me the options to achieve.
if i do head -10 , i wont be getting all pattern match results as output since for a... (10 Replies)
Discussion started by: ananan
10 Replies
4. Shell Programming and Scripting
Hello.
grep v2.21
Debian 8
I wish to search for and output these patterns in order;
"From " "To: " "Subject: " "Message-Id: " "Date: " "To: "
grep works, but not in strict order...
$ grep -a -E "^From |^Subject:|^From: |^Message-Id: |^Date: |^To: " InboxResult;
From - Wed Feb 18... (10 Replies)
Discussion started by: DSommers
10 Replies
5. Shell Programming and Scripting
Hello Guyz
I have been following this forum for a while and the solutions provided are super useful. I currently have a scenario where i need to search for a pattern and start searching by keeping the first pattern as a baseline
ABC
DEF
LMN
EFG
HIJ
LMN
OPQ
In the above text i need to... (8 Replies)
Discussion started by: RickCharles
8 Replies
6. Shell Programming and Scripting
i need to search for a pattern from a big file and print everything expect the next 6 lines from where the pattern match was made. (8 Replies)
Discussion started by: chidori
8 Replies
7. Shell Programming and Scripting
Dear awk users,
I am trying to use awk to match records across two moderately large CSV files. File1 is a pattern file with 173,200 lines, many of which are repeated. The order in which these lines are displayed is important, and I would like to preserve it. File2 is a data file with 456,000... (3 Replies)
Discussion started by: isuewing
3 Replies
8. Shell Programming and Scripting
Hi All,
I am trying to alter all lines between EXEC SQL and END-EXEC that have an INCLUDE in them.
The following code
search="INCLUDE "
cp -f ${WORK}/$file.in ${WORK}/$file.wrk2
for item in `echo $search `; do
> ${WORK}/$file.wrk1
awk -vITEM="$item" '{
if ( $0... (3 Replies)
Discussion started by: Bruble
3 Replies
9. Shell Programming and Scripting
Hi
I need a command to search files in a directory which does not match with pattern .. Plz send me this
Ex : Test is directory and has some 10 files with different name all are with *.dat extension , need to search files which doesnot contain word "Dummy file".
Thanks (6 Replies)
Discussion started by: madankumar
6 Replies
10. Shell Programming and Scripting
Hi
I'm not very good with the serach patterns and I'd need a sample how to find a line that has multiple patterns.
Say I want to find a line that has "abd", "123" and "QWERTY" and there can be any characters or numbers between the serach patterns, I have a file that has thousands of lines and... (10 Replies)
Discussion started by: Juha
10 Replies