Hi
It is possible with sed to print a pattern within a line matching regexp?
So, the line looks like : 19:00:00 blablablabla jobid 2345 <2>
the regexp is "jobid 2345" and the pattern is 56434.
That the code for find... (2 Replies)
Dear Experts,
I have many alarms appeared in a file twice, i want to grep them with this info EVTTIME & DOMAIN, and print them in second file with 1 occurance.
I have tried uniq -d test.txt > newfile and awk '!arr++' test.txt > newfile both are not working
Please help me with this!!!
... (1 Reply)
Hi :),
I am using the script to search "MYPATTERN" in MYFILE and print that block of lines containing the pattern starting with HEADER upto FOOTER.
But my problem is that at some occurrence my footer is different e.g. ";". How to modify the script so that MYPATTERN between HEADER and different... (1 Reply)
Dear Experts,
I have file called file1 in which i am greping a pattern after that i want to next 3 lines when that pattern is matched.
Ex:- file1
USA
UK
India
Africa
Hello
Asia
Europe
Australia
Hello
Peter
Robert
Jo
i want to next 3 lines after matching Hello... (12 Replies)
Hi Friends,
I am working on a script.. Looking forward for your expert help.....
My requirement is:
I have a text file where, need to search equip * RTF or end of line with RTF ,once this pattern is found then print 2nd line, 6th line, 7th line to a different file.
For Ex:
equip 1... (34 Replies)
Hi,
i have data file like:
START1
a
b
STOP
c
d
START2
e
STOP
f
START3
g
STOP
When one of the START<count> variable is passed, i should print all lines matching this until the first 'STOP'
for example if 'START2' is provided for match, i should get the result as:
START2 (1 Reply)
Hi,
I want to match the pattern in file1 with file2 and print the value in file2 and paste in file1
file1:
ISHO RT SR Major 96.46778
Drop Call Rate CS Critical 0.5072662
ISHO RT SR Major 97.754364... (3 Replies)
Hi all,
I want to search for strings in file1 that can be found in file2 and print out the whole line when matching pattern is found.
I have used the below command, but this is not working for me, because it is writing out only the matching patterns from file2, not the whole line.
fgrep -o... (2 Replies)
would like to print everything after matching two patterns AAA and BBB.
output :
CCC
ZZZ
sample data :
AAA
BBB
CCC
ZZZ (4 Replies)
Discussion started by: jhonnyrip
4 Replies
LEARN ABOUT SUSE
igawk
IGAWK(1) Utility Commands IGAWK(1)NAME
igawk - gawk with include files
SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ...
igawk [ all gawk options ] [ -- ] program-text file ...
DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1).
AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like
@include getopt.awk
in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path.
OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports.
EXAMPLES
cat << EOF > test.awk
@include getopt.awk
BEGIN {
while (getopt(ARGC, ARGV, "am:q") != -1)
...
}
EOF
igawk -f test.awk
SEE ALSO gawk(1)
Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995.
AUTHOR
Arnold Robbins (arnold@skeeve.com).
Free Software Foundation Nov 3 1999 IGAWK(1)