10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
So I'm stumped.
First... APOLOGIES... my work is offline in an office that has zero internet connectivity, as required by our client. If need be, I could print out my script attempts and retype them here. But on the off chance... here goes.
I have a text file (file_source) of terms, each line... (3 Replies)
Discussion started by: Brusimm
3 Replies
2. Shell Programming and Scripting
Hi All,
When i am logged into a server , i am able to assign grep value to a variable as follows.
VAR=`grep 'Listener stopped' /logs/perf.log`
However, when i log out of the server, and try to execute the following command by first SSHing into server, it throws error.
$ VAR=`ssh Server... (4 Replies)
Discussion started by: srkmish
4 Replies
3. Shell Programming and Scripting
Hi All,
I need to recursively grep several folders for a MAC address and display the results with the date of the file name at the start. Even better would be if the final results were displayed chronologically so the newest file is always at the end. Oldest at the top, regardless of what... (8 Replies)
Discussion started by: quemalr
8 Replies
4. Shell Programming and Scripting
I am having difficulties with the fllowing script:
!/bin/sh
voicemaildir=/var/spool/asterisk/voicemail/$1/$2/INBOX/
echo `date` ':' $voicemaildir >> /var/log/voicemail-notify.log
for audiofile in `ls $voicemaildir/*.wav`; do
transcriptfile=${audiofile/wav/transcript}
... (4 Replies)
Discussion started by: ghurty
4 Replies
5. Shell Programming and Scripting
does any one know how to turn the equivalent of this command:
awk '/2011 John Doe 8344/,0' /tmp/ops.log | egrep -c "received request"
to
something that would use egrep instead of awk?
What the awk command does is, it searches the ops.log file for "2011 John Doe 8344". When it finds it,... (4 Replies)
Discussion started by: SkySmart
4 Replies
6. UNIX for Dummies Questions & Answers
I have a file in my unix directory called "restart_job1.job". Below is a sample of the script where I am doing a 'grep' to check specifically for an oracle error. If the value 'ORA-" is found, I set a variable to hold the return code value (job1_return_code). If the return code is non zero, I... (2 Replies)
Discussion started by: ncsthbell_dr
2 Replies
7. Shell Programming and Scripting
I want to grep out a part of a snort rule based on the SID given, but all i want as the output is the part in the quotes after the msg: An example line looks something like this:
alert tcp any any -> 127.0.0.1 any (msg:"Example Message"; classtype:Example; sid:123456;)
I would want it to... (7 Replies)
Discussion started by: riott
7 Replies
8. Shell Programming and Scripting
how to grep a file based on another input file
File1
ashu 1 ninetwo hari
qwer 6 givefour jan
fghj 8 noeight mar
vbmi 7 noput feb
--
---
File2
noput
noeight
---
--
Taking the input of grep as File2, a search need to be made in File1 giving File3 as output: (7 Replies)
Discussion started by: er_ashu
7 Replies
9. Shell Programming and Scripting
Trying to find a way to grep for two names on a line. Both names must appear on the same line so '|' / OR is out.
So far, I'm just messing around and I've got
find . -name "*" | xargs grep "Smith"
Let me explain. I'm at a top level and need to know all the names of the files that... (6 Replies)
Discussion started by: Rally_Point
6 Replies
10. Shell Programming and Scripting
Hi All,
I have txt file which has list of files. I have to check whether these files exist or not.
Thanks
supriya (6 Replies)
Discussion started by: supriyabv
6 Replies