Subscribe to Get Free Material Updates!
Visit my new blog WebData Scraping - Web Scraping Service provider company in India.

Accept filename and displays last modification time if file exists, otherwise display appropriate message


clear
echo "Enter filename"
read filename
if [ -f $filename ];then
 echo "file exist and modification time is "; ls -l $filename | cut -c 50-54
else
 echo "file not exist"
fi


Output:

0 comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...

 
Design by Wordpress Theme | Bloggerized by Free Blogger Templates | coupon codes