#! /bin/sh
# Write a shell script to check wether the file exist in the current directory, if the file exist then display the contents of the file else display the file not found in the current directory.
echo "Enter the file name "
read file
if ls $file
then
cat $file
else
echo "The given file is not found in current directory "
fi
# Write a shell script to check wether the file exist in the current directory, if the file exist then display the contents of the file else display the file not found in the current directory.
echo "Enter the file name "
read file
if ls $file
then
cat $file
else
echo "The given file is not found in current directory "
fi



0 comments:
Post a Comment