Write a shell script that accepts one or more file name as arguments and converts all of them to uppercase, provided they exist in the current directory. Script: echo "Enter File Name: " read fileName if [ ! -f $fileName ] then echo "Filename $fileName does not exists" exit fi echo “The content in the File $fileName is:” `tr '[A-Z]' '[a-z]' < $fileName` Output: Enter File Name: Sample The content in the File Sample is: HI THIS IS LINUX & SHELL PROGRAMMING LAB
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter