Advertisement
cd62131

FileExist

Aug 12th, 2014
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.18 KB | None | 0 0
  1. #!/bin/bash -e
  2. typeset -g FILE_PATH
  3. echo -n 'file name: '
  4. read FILE_PATH
  5. if [[ -e ${FILE_PATH} ]]; then
  6.   echo "${FILE_PATH} exist"
  7. else
  8.   echo "${FILE_PATH} don't exist"
  9. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement