Programming Tutorials

(追記) (追記ここまで)

Check if file exists in Shell Script

By: Vivek G in Linux Tutorials on 2011年01月29日 [フレーム]

This shell script demonstrates to check if the given file exists or not.
 if [ $# -ne 1 ]
then
 echo "Usage - 0ドル file-name"
 exit 1
fi
if [ -f 1ドル ]
then
 echo "1ドル file exist"
else
 echo "Sorry, 1ドル file does not exist"
fi



(追記) (追記ここまで)


Add Comment

JavaScript must be enabled for certain features to work
* Required information
1000

Comments

No comments yet. Be the first!

Most Viewed Articles (in Linux )

Latest Articles (in Linux)

(追記) (追記ここまで)
(追記) (追記ここまで)

Related Tutorials

AltStyle によって変換されたページ (->オリジナル) /