Given a file , write a command sequence to find the count of each word.

tr –s “(backslash)040” <file1|tr –s “(backslash)011”|tr “(backslash)040 (backslash)011” “(backslash)012” |uniq –c

where “(backslash)040” is octal equivalent of “space”

”(backslash)011” is octal equivalent of “tab character” and

“(backslash)012” is octal equivalent of newline character.

Category: Shell Scripting Interview Questions.