COMPUTER SCIENCE AND ENGINEERING
UNIX
Question
[CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
|
Which option is used to removes all the spaces in between the text in echo command
|
|
|
˙
|
|
¸
|
|
None of the above
|
Explanation:
Detailed explanation-1: -Using option ‘’¯ – backspace with backslash interpretor ‘-e’ which removes all the spaces in between.
Detailed explanation-2: -3) Remove Spaces in between text using-e and o¯ptions You can choose to remove spaces using the o¯ption in conjunction with the-e parameter.
Detailed explanation-3: -s/[[:space:]]//g; – as before, the s command removes all whitespace from the text in the current pattern space.
Detailed explanation-4: -Use sed ‘s/^ *//g’, to remove the leading white spaces. There is another way to remove whitespaces using ‘sed‘ command. The following commands removed the spaces from the variable, $Var by using ‘sed‘ command and [[:space:]]. $ echo “$Var are very popular now."
There is 1 question to complete.