Below is the sample program that displays the count of words from a file that doesn’t contain any vowel in it.

First create a script file using terminal.

Open terminal and go to your desired folder and type in the command line.

vi my_script

This will create a script file named “my_script” in your current directory and it will open the file in terminal.

Now press the “i” key and type the following code in the script file.

Shell Script

file_contents=$(<$file) # echo "$file_contents" arr=($file_contents) # echo ${#arr[@]} #print the array count=0 for wo


Theme by HermesThemes

Copyright © 2018 CoderzHeaven. All Rights Reserved

Please wait...

Subscribe to our newsletter

Want to be notified when our article is published? Enter your email address and name below to be the first to know.