1.

______ option is used for compressing multiple consecutive characters.(a) -d(b) -c(c) -n(d) -sThe question was posed to me in a job interview.My doubt stems from Unique and tr Command in section Simple Filters of Unix

Answer»

The correct choice is (d) -s

For EXPLANATION I WOULD SAY: tr command can ALSO remove multiple consecutive characters from a line by using -s option. This will make the line squeeze from multiple consecutive occurrences of a character to a single character. For example, to squeeze multiple contiguous spaces use the following command:



Discussion

No Comment Found

Related InterviewSolutions