Quote:
Originally Posted by deeprajn95
i need to create a shell script, which will go into a directory , and scan the files in it for defined errors, there will be around 10 files in the directory.
|
This will work for you...
Code:
#!/usr/bin/ksh
for file is `ls directoryname`
do
echo $file
cat $file | grep -i "error pattern" >newfile
done