Command used to supress all spaces from a given file named test.
-
cat test | cut ' '
-
cat test | tr -s ' '
-
cat test | tr ' ' ''
-
cat test > test 1
B
Correct answer
Explanation
The 'tr -s' option squeezes repeated characters, so 'tr -s ' '' squeezes multiple consecutive spaces into single spaces. The cut command is for field extraction, not character suppression. Option B correctly uses tr with -s flag to compress multiple spaces into one.