Shell script that takes a command –line argument and reports on whether it is directory, a file, or something else Post author:Educate Post published:October 6, 2023 Post category:Shell Script Post comments:0 Comments echo " enter file" read str if test -f $str then echo "file exists n it is an ordinary file" elif test -d $str then echo "directory file" else echo "not exists" fi if test -c $str then echo "character device files" fi You Might Also Like Shell program to compression and decompression of files using gzip and gunzip September 20, 2023 Shell script to create a simple calculator that performs basic arithmetic operations September 16, 2023 Shell program to check the number n is divisible by m or not July 29, 2023 Leave a Reply Cancel replyCommentEnter your name or username to comment Enter your email address to comment Enter your website URL (optional) Save my name, email, and website in this browser for the next time I comment.
Shell script to create a simple calculator that performs basic arithmetic operations September 16, 2023