09-16-2009
Thanks thanhdat.
Just want to know whether my understandin of the below expression is correct.
grep -o "0034\([0-9]\)\+" => This will fetch all numbers starting with 0034
grep -o "0034[0-9]\+" => This will fetch anything that follows 0034. Say for example: 003483744 0034abcd
But the first one picks only 0034, followed by numbers. Am I Right?
Thanks,
Nanda
7 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Can any one tell me what is the importance of '/dev' directory in unix. Is there any possibility to get 'root' by using the files stored in this directory.
Beleive me this is not for any hacking purpose. just for learning.
Hopes a detail reply. thak you (1 Reply)
Discussion started by: madhu
1 Replies
2. Linux
What would be the importance of ~ in this command.
cp first ~/bin
Thanks
from dumb (1 Reply)
Discussion started by: singh85
1 Replies
3. IP Networking
Is there any importance of LS length in DB exchange packet of OSPF protocol as its should be always be 20 bytes. Is this length to be ignored (2 Replies)
Discussion started by: cosmic_egg
2 Replies
4. UNIX for Dummies Questions & Answers
I have written a script for sending automated email, reporting the running status of a cron scheduled work. Now, the issue is, my Project Manager wants, the mail should be received with HIGH IMPORTANCE.
How can I do that, kindly anybody explain.
Thank you so much. (3 Replies)
Discussion started by: mitte_dino
3 Replies
5. Shell Programming and Scripting
Hi
When an entry will be made to the file /var/mail/<user-id> .
I have 100 scripts under a specific user id(dgircc) in cron .SO inrder to check the whether the script has sucessfully run or not and if not to generate an email
if i mention the code like
#!/bin/ksh -p
2 fsize=`ls -lrt... (0 Replies)
Discussion started by: mskalyani
0 Replies
6. Shell Programming and Scripting
Hi,
I have multiple list which is arranged by order of importance. I need to do sorting on these lists based on the last name of the user(initial), if user name does not have initial then first name is initial . Important thing is that the last name in the list is important. If there is two or... (1 Reply)
Discussion started by: pratapsingh
1 Replies
7. Shell Programming and Scripting
Hi All,
Can you please help me in understanding the importance of -depth of find.
I am trying to execute below code.find . -mtime +5 -name "*" -depth -exec ls -l {} \;
But it is throwing below error.find: warning: you have specified the -depth option after a non-option argument -mtime,... (2 Replies)
Discussion started by: Girish19
2 Replies
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 is used to invoke the grep on compress'ed or gzip'ed files. All options specified are passed directly to grep. If no file is speci-
fied, 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 zgrep is invoked as zegrep or zfgrep then egrep or fgrep is used instead of grep. If the GREP environment variable is set, zgrep uses
it as the grep program to be invoked. For example:
for sh: GREP=fgrep zgrep string files
for csh: (setenv GREP fgrep; zgrep string files)
AUTHOR
Charles Levert (charles@comm.polymtl.ca)
SEE ALSO
grep(1), egrep(1), fgrep(1), zdiff(1), zmore(1), znew(1), zforce(1), gzip(1), gzexe(1)
ZGREP(1)