10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Team,
in /tmp folder i have thousands of log files i want to read each file and grep a value called "Calling This".
Each logfile name is different but it ends with .log.
How can i achieve this?
Please excuse if i did any mistake by not following forum standards. I will surely follow... (10 Replies)
Discussion started by: darling
10 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I have a number of files containing the information below.
"""""
Fundallinfo
6.3950 14.9715 14.0482
"""""
I would like to grep for Fundallinfo and use it to read the next line? I ideally would like to read the three numbers that follow in the next line and... (2 Replies)
Discussion started by: Paul Moghadam
2 Replies
3. Shell Programming and Scripting
Hi,
I have a file while is the output of lspath command and output of file is
#cat lspath.txt
Enabled hdisk0 vscsi0
Enabled hdisk0 vscsi1
Enabled hdisk1 vscsi0
Enabled hdisk2 vscsi0
Enabled hdisk2 vscsi1
Missing hdisk3 vscsi0
Enabled hdisk3 vscsi1
Have created script to check state... (7 Replies)
Discussion started by: ksgnathan
7 Replies
4. Shell Programming and Scripting
Hi Guys,
I have a small script which greps for the username reading from stdinput.
./file.sh pattern
pattern=$1
grep "blah blah.*$pattern" /home/user/log.txt
Instead of typing the pattern everytime i want to read the pattern from a file inside the shell script and execute the... (5 Replies)
Discussion started by: Irishboy24
5 Replies
5. UNIX for Dummies Questions & Answers
I have two files
file1.txt
angie
mary
susan
file2.txt
angie blond
mary brunnet
susan red
christine blackI want to get this output
angie blond
mary brunnet
susan redI write
grep --file=file1.txt file2.txtand i get no results
i also wrote
cat file1.txt|while read line... (19 Replies)
Discussion started by: FelipeAd
19 Replies
6. Shell Programming and Scripting
I'm putting together a script that will search my mail archives for emails that meet certain criteria and output the files to a text file.
I can manually cat that text file and pipe it into sendmail and it will work (i.e. cat /pathtofile/foo.txt | sendmail -t me@company.com)
My script sends... (7 Replies)
Discussion started by: binary-ninja
7 Replies
7. Shell Programming and Scripting
Hello Everyone,
i need to read specific number of lines ( always serialized ; i.e from 10 to 20 or from 34 to 44 ) in a file , where the first line is found by grep 'ing a keyword.
example
file.txt
------------------------------------------------------------------
--header
this is the... (7 Replies)
Discussion started by: alain.kazan
7 Replies
8. Shell Programming and Scripting
I have a key file
$ cat klist
5 N:8855 CASA VERDE ROAD :32827 :ORLAND
5 N:585 MOLLY LANE :30189 :WOODST
5 N:320 NINA ROAD :32304 :TALLAH
and a data file, see example of the line below:
N:RT 15 & N 7TH STREET :17837 :U SAVE
I need to search by key (2nd field) from klist... (6 Replies)
Discussion started by: migurus
6 Replies
9. UNIX for Dummies Questions & Answers
I am still fairly new to unix scripting and I will try my best to explain my question the best I can....
I have a text file called hello.txt, and in this file I need to search every line that contains the words "help" and "cat" and move the respective lines into their own columns in another... (2 Replies)
Discussion started by: silvermax
2 Replies
10. Shell Programming and Scripting
Dear all,
I am reading a file that has 1 column. While reading I must find the line references from the another file. The following shell doesn't works.
Please help
#!/bin/bash
while read filename; do
grep ${filename} fs_full.dat >> unprocfull.dat;
done < unproc.dat
But when... (2 Replies)
Discussion started by: mr_bold
2 Replies