The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 11-20-2007
happyv happyv is offline
Registered User
  
 

Join Date: Sep 2006
Posts: 209
not showing restore information while run script

Hello,

I have the following script to restore file and grep information. However, once it restore file, it showing a lot useless information and different to check which file have the statement "John price $200". Can I not show any information while running script. It only show..when found the string?
echo Please input list file name:
read listn
for file in `cat $listn.txt`
do
restore_file $file
cat $file |grep "John price $200"
done

expect output:
filename: XXXXXX
found string: John price $200