The middle part takes care to escape any regular expression special characters so you can pass them to grep. This is off the cuff so I probably forgot about one or two which would need escaping.
Hi
I am facing the problem where my HP Unix system date is in accordance with the current date but the logs written by the same is of previous time stamp.
Eg. System Date - Thu Mar 15 18:00:04 IST 2007
Syslogs -
Mar 15 12:30:10 mac@1 ftpd: FTP LOGIN FROM xx.xxx.xxx.xx , main
The ftp... (1 Reply)
hi everybody,
i m AIX guy....
due 2 some reason i was also askd 2 work in HP-UX
so i think all d concepts r same as AIX....
so i thought it s easy to learn by comparitve study....
if so
then wr can i get the materials????????
thanks in advance........ (1 Reply)
Task:
Short Description: To find the files in a particular directory for the previous day, sort them by date and time and e-mail it across to a particular id.
And the time is divided into eight fields and based on the time the respective field should be updated with the flag 1.
Eight... (7 Replies)
I have written a script that deletes files:
Requirement: i need to delete the files and to know how many files are deleted i.e the count of files and even i need to display when the started time of deletion and the ending time of deletion. I need to display these two times.
script:
... (2 Replies)
Hi,
I need someone's help in writing a shell script. Since am very new i am stuck .
I have 2 files in the same dir.
==============================================
FileA
Table1~07/07/2009 00:00:00~4
Table1~07/06/2009 00:00:00~41
Table1~07/08/2009 00:00:00~4
... (8 Replies)
Hi,
i have a script of following content
#!/usr/bin/sh
'exit 255' USR1
ncm_CheckDir.pl -a
/cnt/mgr/test/working/applog_CheckDir.log -c
/cnt/mgr/test/lib/config/bp_CheckDir.conf -s
/cnt/mgr/test/log/syslog
filename : BC_CheckDir
when i execute ie :
sh BC_CheckDir
i am getting... (11 Replies)
Hi guys,
I am new to shell scripting and I need urgent assistance.
I have an xml like :
<AgreementNumberFull>13-WY-84252</AgreementNumberFull>
<AgreementNumberAbbr>WY84252</AgreementNumberAbbr>
<LineOfBusiness>F</LineOfBusiness>
<CompanyCode>0005</CompanyCode>
<UniqDigit/>
<StateCode/>
... (9 Replies)
Hi,
I have a unix file with the following contents
#/usr/bin/sh
cd /ct/mr/prod/bin
ncm_AdjCob.pl -a /ct/mr/prod/wg/applog_AdjDev.log
-c /ct/mr/prod/lib/config/bcmp_AdjDevCob.conf
-s /ct/mr/prod/log/syslog
can anyone explain what it says.
particularly -a ,-c... (5 Replies)
hi all,
i have a data sm thg like this
28504 0 abc 148782859 42 101M nhmmmm ilopo abc 2345432
i want to get only the field which is just aftr abc i,e., 148782859, 2345432
i have used grep /abc\t/ filename to get that but its not working can any 1 help me out (5 Replies)
Discussion started by: anurupa777
5 Replies
LEARN ABOUT LINUX
zegrep
ZGREP(1) General Commands Manual ZGREP(1)NAME
zgrep - search possibly compressed files for a regular expression
SYNOPSIS
zgrep [ grep_options ] [ -e ] pattern filename...
DESCRIPTION
Zgrep invokes grep on compressed or gzipped files. These grep options will cause zgrep to terminate with an error code:
(-[drRzZ]|--di*|--exc*|--inc*|--rec*|--nu*). All other 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 the GREP environment variable is set, zgrep uses it as the grep program to be invoked.
EXIT CODE
2 - An option that is not supported was specified.
AUTHOR
Charles Levert (charles@comm.polymtl.ca)
SEE ALSO grep(1), gzexe(1), gzip(1), zdiff(1), zforce(1), zmore(1), znew(1)ZGREP(1)