This shell program will accept a variable number of command line arguments and create a new file associated with each command line argument . This program uses touch command to create file if not exiests else creates new file.
echo "No of files entered are:$#" echo "*********" if [ $# == 0 ]; then echo "No files to create" else for var in $@ do touch $var echo "File $var created successfully...!" done fi
No comments:
Write comments