09-27-2002
Check your man page. Some versions of grep allow you to specify the "-l" flag to only printer the file name... See if you have that.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i have a set of directories, all with a set of files inside
ie name/week1
there is a selection of files in each directory, and i need to read each one, and find data in each one, although not all the numbers are there
can anyone help me please
(i know this is kinda vague, just pm... (2 Replies)
Discussion started by: st00pid_llama
2 Replies
2. Filesystems, Disks and Memory
How to search a given pattern in the files which are present in my current working directory and its subdirectories recursively (1 Reply)
Discussion started by: gandhevinod
1 Replies
3. Shell Programming and Scripting
Hi,
I am new to Unix and am using csh to create a script where all files in a directory of a particular type are changed. As an example, if rename.csh tmp .tab .txt is entered at the command line, all of the .tab files in the tmp directory will be changed to .txt files. I have created the... (8 Replies)
Discussion started by: Enigma23
8 Replies
4. UNIX for Dummies Questions & Answers
If I go into a directory and type in ..
more * | grep foo
I get the lines of text that contain foo in all of the files in the directory out of all of the files that are there.
How do I make it so I can find out what the names of the files are that contain that text "foo"? By doing what I... (4 Replies)
Discussion started by: LordJezo
4 Replies
5. Shell Programming and Scripting
I'm currently trying to write a script that will do the following:
search a given directory tree for a file with MMDDYYYY in the name.
delete those files only.
I can't figure out how to make the script delete the files with the MMDDYYYY in the filename after finding them.
Should I export... (7 Replies)
Discussion started by: blane
7 Replies
6. Shell Programming and Scripting
Hi,
Need to extract a string from one file and search the same in other files.
Ex:
I have file1 of hundred lines with no delimiters not even space.
I have 3 more files.
I should get 1 to 10 characters say substring from each line of file1 and search that string in rest of the files and get... (1 Reply)
Discussion started by: mohancrr
1 Replies
7. Solaris
Hi,
I am trying to write a script that will search in a particular directory and tell me how many files are in there. I then want to be able to email certain users of how many files are in that directory and what the file names are?
any help would be great as i am getting confused.
thanks (3 Replies)
Discussion started by: Pablo_beezo
3 Replies
8. Shell Programming and Scripting
The command is to search all the matched directory under $HOME, the input i directory is the last argument
it works perfectly by itself
but after a method call, it wont work cant figure out why
dirNameCheck(){
for i in $*
do
test $1
done
noMatch=`find HOME -type d -name $i |... (0 Replies)
Discussion started by: cryogen
0 Replies
9. Shell Programming and Scripting
Hi all,
I have some data in the form of
adc|nvhs|nahssn|njadnk|nkfds
in the above data i need to write a script so thet it will append "|||" to the third occurnace in the string ..... the outout should look like
adc|nvhs|nahssn||||njadnk|nkfds
Thanks,
Firestar. (6 Replies)
Discussion started by: firestar
6 Replies
10. UNIX for Dummies Questions & Answers
Hi Folks,
I am using the putty as I need to check the logs, My query is that I know the location of my logs ..that is
cd /var /logs/abc.log
so I can reach to this place and open the logs in putty, But what About if I do not the location only thing I know the name of the abc.log , and I have... (1 Reply)
Discussion started by: KAREENA18
1 Replies