The word unix is present in only some of the files supplied as arguments to the shell script. Your shell script should search each of these files in turn and stop at the first file that it encounters containing the word unix. This filename should be displayed on the screen.
while [ $# -gt 0 ]
do
a=`grep -i "unix" $1 | wc -l`
if [ $a -gt 0 ]
then
echo "file name is $1"
exit 0
fi
shift
done
Shopping In MUMBAI
Are you searching for Discounts, offers, sale in Mumbai ? You are in the right place. MUMBAI, a shopping haven, has no dearth of great discounts and sales. This blog features the best MUMBAI shopping offers, sale, discounts and deals and bargains CURRENTLY GOING on in Mumbai plus a few free things thrown in on top.
Don't wait for it because once they are gone, they are gone. Hurry!..By clicking the "Like" button you will receive a daily update of discounts, sale, offers going on in Mumbai. LIKE IT.... SHARE IT...njoY.
Thursday, January 22, 2009
Program in UNIX - Filename displayed
Posted by ars at 4:51 AM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment