Shell Script to find the count of words in a file with no Vowels.

By | July 9, 2016

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

Website Pin Facebook Twitter Myspace Friendfeed Technorati Digg Google StumbleUpon Premium Responsive