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 CENTOS
bzgrep
BZGREP(1) General Commands Manual BZGREP(1)NAME
bzgrep, bzfgrep, bzegrep - search possibly bzip2 compressed files for a regular expression
SYNOPSIS
bzgrep [ grep_options ] [ -e ] pattern filename...
bzegrep [ egrep_options ] [ -e ] pattern filename...
bzfgrep [ fgrep_options ] [ -e ] pattern filename...
DESCRIPTION
Bzgrep is used to invoke the grep on bzip2-compressed files. All options specified are passed directly to grep. If no file is specified,
then the standard input is decompressed if necessary and fed to grep. Otherwise the given files are uncompressed if necessary and fed to
grep.
If bzgrep is invoked as bzegrep or bzfgrep then egrep or fgrep is used instead of grep. If the GREP environment variable is set, bzgrep
uses it as the grep program to be invoked. For example:
for sh: GREP=fgrep bzgrep string files
for csh: (setenv GREP fgrep; bzgrep string files)
AUTHOR
Charles Levert (charles@comm.polymtl.ca). Adapted to bzip2 by Philippe Troin <phil@fifi.org> for Debian GNU/Linux.
SEE ALSO grep(1), egrep(1), fgrep(1), bzdiff(1), bzmore(1), bzless(1), bzip2(1)BZGREP(1)