hey guys this is my first post here, heard a lot about these forums. Iam urgently in need of a command which would help me accomplish the following , for example a file has these contents:
211 61 2007-06-26 13:47:32
211 61 2007-06-26 09:53:43
211 61 2007-06-26 15:25:14
211 61 2007-06-26... (5 Replies)
Hi,
I want to use egrep to match this expression in my file. The expression begins with the word SCHEDULE and ends with PFTDGNIN. In between these 2 words there can be anything.
EX: Line1: SCHEDULE NWERRR#PFTDGNIN
Line2: FOLLOWS NWD@AAS#PFTDGNIN
So as a result of the egrep command... (1 Reply)
Hi,
I need help with using an awk or sed filter on the below line
ALTER TABLE "ACCOUNT" ADD CONSTRAINT "ACCOUNT_PK" PRIMARY KEY ("ACCT_ID") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 65536 FREELISTS 1 FREELIST GROUPS 1) TABLESPACE "WMC_DATA" LOGGING ENABLE
Look for... (1 Reply)
I'm new to egrep. What pattern could I use to find all lines that match this pattern: <beginning of line><any amount of whitespace>sub<space>. I want it to return the entire line.
(I'm trying to generate a list of all Perl sub definitions in a list of Perl modules.)
Thanks for your help! (7 Replies)
Hi
I use arp to get the mac-addresses of my hosts.
# arp -a | grep 192.168.0.
e1000g0 192.168.0.1 255.255.255.255 o 00:00:00:00:00:01
e1000g0 192.168.0.11 255.255.255.255 o 00:00:00:00:00:02
e1000g0 192.168.0.2 255.255.255.255 ... (12 Replies)
Hi everyone
i want to write a script to grep multiple pattern from all the file from a dir.
for example I want to get all the record number from XML file who's last name is asd, smith, dfrt,gokul,and sinha.
I tried
egrep('sinha'|'gokul'|'asd')
but it is not working
also i tried saving... (2 Replies)
HI,
I have a piece of code which checks the return value for a pattern "Status: 0000" like this -
returnval=<<some op>>
echo $returnval | egrep "\bStatus:\s+"
if ; then
echo "Failed"
fi
Even on success or failure i get $? = 1 i.e. it never passes ? (16 Replies)
Hello,
I need to find all *.xml files that matched by pattern on Linux. I need to have written the file name on the screen and then change the pattern in the file just was found.
For instance.
I can start the script with arguments for keyword and for value, i.e
script.sh keyword... (1 Reply)
Hi All,
I have a oracle code & want to exclude the comments present in the code. Below may be the pattern can be considered for eg.
-- ALTER TABLE
ALTER TABLE -- To create
In above sample, First line is full commented line as it starts with "--"
Wheras the second line is starting... (2 Replies)
Hi,
I need advice on a simiple pattern check,
Orginal Code
bpimagelist -backupid xxxxxxxxxxxxx | grep "FRAG " | egrep -i "C5|W5" | awk 'NR==1{print $2,$9}
1 MAC514
What i want is to find any media beinging with C5|W5. I have tried ^C5|^W5, but this does not work.
Removed... (3 Replies)
Discussion started by: Junes
3 Replies
LEARN ABOUT NETBSD
zfgrep
ZGREP(1) BSD General Commands Manual ZGREP(1)NAME
zgrep, zegrep, zfgrep -- print lines matching a pattern in gzip-compressed files
SYNOPSIS
zgrep [grep-flags] [--] pattern [files ...]
zegrep [grep-flags] [--] pattern [file ...]
zfgrep [grep-flags] [--] pattern [file ...]
DESCRIPTION
zgrep runs grep(1) on files or stdin, if no files argument is given, after decompressing them with zcat(1).
The grep-flags and pattern arguments are passed on to grep(1). If an -e flag is found in the grep-flags, zgrep will not look for a pattern
argument.
zegrep calls egrep(1), while zfgrep calls fgrep(1).
EXIT STATUS
In case of missing arguments or missing pattern, 1 will be returned, otherwise 0.
SEE ALSO egrep(1), fgrep(1), grep(1), gzip(1), zcat(1)AUTHORS
Thomas Klausner <wiz@NetBSD.org>
BSD December 28, 2003 BSD