10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
(1 Reply)
Discussion started by: Twinklefingers
1 Replies
2. Shell Programming and Scripting
Hi,
I have a list of zipped files. I want to grep for a string in all files and get a list of file names that contain the string. But without unzipping them before that, more like using something like gzcat.
My OS is:
SunOS test 5.10 Generic_142900-13 sun4u sparc SUNW,SPARC-Enterprise (8 Replies)
Discussion started by: apenkov
8 Replies
3. Shell Programming and Scripting
Hi Experts,
Here is my scenario:
Am maintaining a file which has list of logs with complete path and file names like bleow
a/b/c/Daily/file1_20111012.log
d/e/f/Monthly/file1_20111001.log
g/h/Daily/file1_20110120.log
i/Daily/file1_20110220.log
How to copy the file names frm the list... (7 Replies)
Discussion started by: laxm
7 Replies
4. Shell Programming and Scripting
Hi friends,
It gives me 3 lines in output which contain word "automation".
But along with it I want the script to return file name from which it got the word.
How to do it?
Plz guide me
Anu (4 Replies)
Discussion started by: anushree.a
4 Replies
5. Shell Programming and Scripting
I have the following list of file names stored in $fnames, so that if I do
foreach f ($fnames)
echo "$f"
end
I will get
n02-z30-sr65-rgdt0p50-dc0p002-16x12drw-run1
n02-z30-sr65-rgdt0p50-dc0p002-16x12drw-run2
n02-z30-sr65-rgdt0p50-dc0p002-16x12drw-run3... (3 Replies)
Discussion started by: kristinu
3 Replies
6. UNIX for Dummies Questions & Answers
I want to search files (basically .cc files) in /xx folder and subfolders.
Those files (*.cc files) must contain #include "header.h" AND x() function.
I am writing it another way to make it clear,
I wanna list of *.cc files that have 'header.h' & 'x()'. They must have two strings, header.h... (2 Replies)
Discussion started by: ritikaSharma
2 Replies
7. Shell Programming and Scripting
Hi!!!
I am trying to grep a number in more then 1000 files which are .gz.
Below is the code :-
for i in `ls 20090618yz*_07.znf.gz`
do
a=`gzcat 20090618yz*_07.znf.gz | grep 9814843011`
if
then
echo $i
fi
done
My objective is to echo the file name also with the data.
... (3 Replies)
Discussion started by: tushar_tus
3 Replies
8. UNIX for Dummies Questions & Answers
Hi experts,
I Need to print file names in a certain date range using ls:confused:. Please help me with any sample script. Thanks a lot in advance.
Regards,
Satish (4 Replies)
Discussion started by: satish.vutti
4 Replies
9. UNIX for Dummies Questions & Answers
When I do the following :
grep -l "string" *,
I get a list of file names returned. Is there a way to copy the files returned from the list into another directory ?.
Thanks. (4 Replies)
Discussion started by: Kartheg
4 Replies
10. UNIX for Dummies Questions & Answers
How will you list only the empty lines in a file (using grep) (1 Reply)
Discussion started by: JosephGerard
1 Replies