CoolDudeeh
IS-IT--Management
Can anyone tell me how to do this little script on the command line in one command?
Its function is to find files containing certain text that is passed to it and the "ll" the files.
Say this script is called "fnd"
its usage is fnd text
---------------------------------------
grep -l $1 * > /tmp/list.txt
for filename in `cat /tmp/list.txt`
do
ll $filename
done
rm /tmp/list.txt
----------------------------------------
Its function is to find files containing certain text that is passed to it and the "ll" the files.
Say this script is called "fnd"
its usage is fnd text
---------------------------------------
grep -l $1 * > /tmp/list.txt
for filename in `cat /tmp/list.txt`
do
ll $filename
done
rm /tmp/list.txt
----------------------------------------