Logo 
Search:

Unix / Linux / Ubuntu Articles

Submit Article
Home » Articles » Unix / Linux / Ubuntu » Homework HelpRSS Feeds

Shell Script to check file is ordinary or not

Posted By: Lutera Fischer     Category: Unix / Linux / Ubuntu     Views: 5304

Write a Shell Script to check then file is ordinary or not.

Code for Shell Script to check file is ordinary or not in Unix / Linux / Ubuntu

if [ $# -eq 0 ]
then
echo "enter proper parameter"elseif [ -f $1 ]
  then
  echo "file is ordinary"
  fi
fi


OUTPUT
***********

[04mca58@LINTEL 04mca58]$ sh checkfile.sh f1
file is ordinary
[04mca58@LINTEL 04mca58]$ sh checkfile.sh
enter proper parameter
  
Share: 


Didn't find what you were looking for? Find more on Shell Script to check file is ordinary or not Or get search suggestion and latest updates.

Lutera Fischer
Lutera Fischer author of Shell Script to check file is ordinary or not is from Frankfurt, Germany.
 
View All Articles

Related Articles and Code:


 
Please enter your Comment

  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].

 
No Comment Found, Be the First to post comment!