11-12-2011
Hi Agama,
Many thanks for your reply.
Unfortunately, grep -f did not work (no output)
When I substituted the actual first line for the variable (with the -n at the back), it returned the correct row (with row number).
I just can't figure out why it does not work with grep -f or with a loop.
Beginner0302
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
When I type a command at the command line it supplies one result and the exact same command in a script
egrep '^01|^02|^03|^04' file > fileout
count = 29353
same count in the script yields a count of 23492
is there any reason this could be happening. (1 Reply)
Discussion started by: r1500
1 Replies
2. Shell Programming and Scripting
Hello
I have a pretty big problem here. I have a very large file having lines running into millions. A small sample of the data is shown below
<CRMSUB:MSIN=5000000013,BSNBC=TELEPHON-55108663-TS11&TS21&TS22,MSCAT=ORDINSUB,SUBRES=ALLPLMN-AIRSIMLA,BAOC=OIC,NUMTYP=MULTI;... (3 Replies)
Discussion started by: PradeepRed
3 Replies
3. UNIX for Dummies Questions & Answers
Hi,
Can anyone translate in words what this line command does:
ls *.fits | grep -v "Zero\|zero" > objlist
Obviously ls *.fits means to list all the fits file, grep looks for a certain word, Zero is a certain fits file, and > objlist , created a list with certain items, but I am not sure what... (3 Replies)
Discussion started by: cosmologist
3 Replies
4. UNIX for Dummies Questions & Answers
Hi
Is there any way GREP command can return word and not complete line.
My file has following data:
Hello Everyone I am NitinrajSrivastava
Hi Friends Welcome VrajSrivastava
I am using grep 'raj' which is returning me complete line.However I want only the word having keyword 'raj'.
Required... (11 Replies)
Discussion started by: dashing201
11 Replies
5. Shell Programming and Scripting
Hi
i have a file which have a pattern like this
Nov 10 session closed
Nov 10 Nov 9 08:14:27 EST5EDT 2010 on tty .
Nov 10 Oct 19 02:14:21 EST5EDT 2010 on pts/tk .
Nov 10 afrtetryytr
Nov 10 session closed
Nov 10 Nov 10 03:21:04 EST5EDT 2010
Dec 8 Nov 10 05:03:02 EST5EDT 2010
... (13 Replies)
Discussion started by: Himanshu_soni
13 Replies
6. Shell Programming and Scripting
Hi,
I need to search a word in the java file.
Assume the line in the java file is, (the line was splitted into 3 lines)
1.operationContext.sendFeedback(2.FeedbackType.ERROR, null, "Input is empty.", "Input Details: pr
3.ovide Valid pair(s): "+pairType);
When i grep for the word... (6 Replies)
Discussion started by: tulasiram
6 Replies
7. Shell Programming and Scripting
Hello Dear Friends I have a question about grep command
when I type the command grep 'energy' mydata.txt it gives me
energy= 5001
energy= 8500
energy= 5505
energy= 5506
however I only want to see the last line. How can I use the grep command to pick the last line of grep output.
... (9 Replies)
Discussion started by: rpf
9 Replies
8. Shell Programming and Scripting
here is what i want to achieve.. i have a file with below contents
cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
--dport 7800 -j REJECT --reject-with icmp-port-unreachable
.
.
.
more blah blah blah
--dport 3306... (14 Replies)
Discussion started by: vivek d r
14 Replies
9. Shell Programming and Scripting
Hi,
I want to read a file line by line and exclude the lines that are beginning with special characters. The below code is working fine except when the line starts with hyphen (-) in the file.
for TEST in `cat $FILE | grep -E -v '#|/+' | awk '{FS=":"}NF > 0{print $1}'`
do
.
.
done
How... (4 Replies)
Discussion started by: Srinraj Rao
4 Replies
10. UNIX for Beginners Questions & Answers
Hi All,
I have some xml files and I need to find out all xml where one specific type of pattern is available..
Pattern 1
==========
<MAP TIMEOUT="" MODE="STANDALONE">
<COMMENT>without Any Mapping</COMMENT>
</MAP>
Pattern 2
==========
<MAP TIMEOUT="" MODE="STANDALONE">
... (4 Replies)
Discussion started by: Baharul
4 Replies
LEARN ABOUT DEBIAN
mrtg-forum
MRTG-FORUM(1) mrtg MRTG-FORUM(1)
NAME
mrtg-forum - Interactive Help for MRTG users
SYNOPSIS
There is a lot of written documentation for mrtg, but nevertheless you may have a problem where you can't find the solution. In this case
some Human Help may be necessary. With MRTG there are several ways to get Humans to help you.
MAILING-LIST
There are three mailing lists for MRTG available.
mrtg
for discussion among mrtg users.
mrtg-announce
for announcements regarding new versions of mrtg related software.
mrtg-developers
for discussion among people who write software in connection with mrtg or who hack mrtg itself.
THE RULES
Please note that the memebers of the mrtg mailinglist value politeness highly. This means behave in a way you would like others to behave
towards you.
o No shouting. (NO CAPS)
o No rude language
o No demands. everybody is on the list out of their own free will. If you do not get an answer to your question, chances are high that
you did not give sufficent details about the nature of your problem or that the answer to your problem is in the documentation.
o If you do not follow the rules you will be unsubscribed from the list with no further questions asked.
o Decisions about your unsubscription from the list will be taken by
Alex van den Bogaerdt <alex at ergens.op.het.net>
Paul C. Williamson <pwilliamson at MANDTBANK.COM>
If you feel that you have been treated unfairly, you may send mail to me and explain the situation.
Tobi Oetiker <tobi@oetiker.ch>
SUBSCRIBING
These lists are managed by a mailing-list management program (listar). It allows you to subscribe to these lists by sending a message with
the subject: subscribe to the following address:
listname-request@lists.oetiker.ch
You will then get a message asking you to confirm your subscription.
For posting to the lists use the following address
listname@lists.oetiker.ch
Note that only people who are subscribed to the list can post.
Further information about the usage of the mailing lists is available by sending a message with the subject line help to either one of the
request addresses.
There is also a webinterface to the lists on
http://lists.oetiker.ch
List archives are on
http://www.mail-archive.com/index.php?hunt=mrtg
and
http://gmane.org/find.php?list=mrtg
NEWSGROUP
For discussion of MRTG or related topics on the Usenet, please send your posts to:
news:comp.dcom.net-management
Many MRTG users are in this forum and will help you. You can also find an archive of past activity from this Newsgroup on:
http://groups.google.com/group/comp.dcom.net-management
IRC Channel
For discussion of MRTG and related topics on IRC, the `#mrtg' channel on EFNet has been created.
More information can be found at
http://mrtg.easymac.org
MRTG Japan
There is a special Mailinglist for MRTG Users in Japan. It carries translations of the traffic from MRTG-ANNOUNCE as well as updates on the
Japanese Translation of the MRTG documentation. Go to http://www.mrtg.jp/ for further Information.
AUTHOR
Tobias Oetiker <tobi@oetiker.ch> and many contributors
2.17.4 2012-01-12 MRTG-FORUM(1)