08-17-2008
egrep -i "title.regu." `find . -name "*.dat"` > output
cat $output | while read line
do
dir=$( echo $line | cut -d / f2)
cd dir
# you will reach in directory and can execute whatever you want then.
done
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi,
Can someone help me count this line:
Say I have a file (file1.txt) that contains below:
11/16 13:08:19.5436 18096 --- Generating a <reading> event
11/16 13:08:19.7784 18096 ---- Sending a <writing> event
11/16 13:08:37.4516 18096 --- Generating a <reading> event
11/16... (1 Reply)
Discussion started by: Orbix
1 Replies
2. UNIX for Dummies Questions & Answers
Hi I've been searching google and have not found what egrep -c means. Does anyone know where I can get a cheat sheet or what that -c means?
thanks,
Linda (2 Replies)
Discussion started by: leelm
2 Replies
3. Shell Programming and Scripting
hi ,
I'm new at unix bash scripting, im playing a little bit with egrep/grep.
I have serveral files and i do a search on those files, like "aki", the result
is many rows outcoming and serveral of them are dubble because aki wil come more than ones in a file, how can i get a result that it... (3 Replies)
Discussion started by: tvrman
3 Replies
4. Shell Programming and Scripting
Hi all,
Can egrep using AND OR ?, like egrep -i "title.$1" AND "category.$2" ./home....
I want to give two search criteria, the files where egrep is seaching in for example
looks like below rows.
title this is an test
category space
(command line input)
$1 script.sh this space
... (6 Replies)
Discussion started by: tvrman
6 Replies
5. UNIX for Dummies Questions & Answers
Hi Guys,
we have a shell script which basically query the Database which retrieves huge data and use the data with "egrep" .
Now there is some data which contains characters like "abc)" and the same is used like below :
"egrep (.+\|GDPRAB16\|GDPR/11702 96 abc)\|$ temp.txt"
now while... (7 Replies)
Discussion started by: sagarjani
7 Replies
6. Shell Programming and Scripting
Problem:
I am trying to create a menu in a menu script and I am running into an issue with the calculator portion of the script. I am first presented with the ==Options Menu== which all 5 options working correctly. Now comes the fun part. I select option 1 which takes me to my ==Calculator... (1 Reply)
Discussion started by: iDdraig
1 Replies
7. Shell Programming and Scripting
hi all i am a newbie to this
is there any examples on creating a main menu with 3 sub menu
main menu -> option a , b and c
a menu -> option 1 ,2 and 3
b menu -> option 1 ,2
c menu -> option 1 ,2
i am getting headache as my code kept getting unexpected EOF
---------- Post... (0 Replies)
Discussion started by: chercm
0 Replies
8. Shell Programming and Scripting
Hello,
Need help...
using egrep how do I make sure string is after 5th comma
example:
a,b,c,d,e,f,g,h,i
Suppose i want to search letter f but want to make sure it is after 5th comma.
Is there any way to check string is after 5th comma?
Thanks !! (9 Replies)
Discussion started by: vegasluxor
9 Replies
9. Shell Programming and Scripting
Hi Gurus,
I have requirement to compare current result with previous reuslt.
The sample case is below.
1 job1 1
1 job2 2
1 job3 3
2 job_a1 1
2 job_a2 2
2 job_a3 3
3 job_b1 1
3 job_b2 2
for above sample file, GID is group ID, for input line, the job run... (1 Reply)
Discussion started by: ken6503
1 Replies
10. UNIX for Beginners Questions & Answers
I installed CentOS 8 with Gnome 3.28.2 and I noticed that the "switch user" menu item disappeared from under the system menu of Gnome classic (Both X11 & Wayland). I checked google and this problem seems to have a history going back several releases of Gnome.
Unfortunately, I never found a... (1 Reply)
Discussion started by: bodisha
1 Replies
LEARN ABOUT DEBIAN
nngrab
NNGRAB(1) General Commands Manual NNGRAB(1)
NAME
nngrab - news retrieval by keyword (nn)
SYNOPSIS
nngrab [ -c ] keyword
DESCRIPTION
nngrab invokes nn on all USENET articles whose subject (or keyword) field(s) contain an instance of keyword. nngrab is a fast equivalent
for:
nn -mxX -s/keyword all
For example,
nngrab tesla
will retrieve items concerning Nikola Tesla.
Keyword case is ignored unless -c is specified, and the keyword can be a regular expressions (escaped to avoid conflicts with the shell).
For example,
nngrab "n.*tesla"
The range of search includes all newsgroups on the system, including ones which are unsubscribed.
FILES
$db/subjects subject database
SEE ALSO
nn(1), nnspew(8), egrep(1)
NOTES
nngrab can be much faster than the equivalent command shown above, if the tertiary news subject database generated by the nnspew(8) daemon
exists. To enable the faster operation, nnspew must be executed regularly by cron.
nngrab uses egrep(1) to scan the subject database, so if you are not running fast egrep (GNU-style) this is all for naught.
nngrab will use a subject database generated by nnspew independent of its age. Thus, if you stop running nnspew, remember to remove the
subjects file as well.
BUGS
Under version 6.4 onwards, search of the "Keywords:" field is not supported.
Search on name is not possible either.
AUTHOR
James A. Woods, NASA Ames Research Center
E-mail: jaw@ames.arc.nasa.gov
4th Berkeley Distribution Release 6.6 NNGRAB(1)