Advertisement
Shailrshah

Print whether File is present

Nov 5th, 2014
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.15 KB | None | 0 0
  1. #! /bin/bash
  2. echo "Enter file name in "
  3. pwd
  4. ls
  5. read file1
  6.  
  7. if [ -s $file1 ] ; then
  8.     echo "data present"
  9. else echo " No data/Non-Existant"
  10. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement