Write the commands to remove all the space characters stored in the shell variable text. Be sure to assign the result back to text. First use tr to do it and then do the same thing with sed.
What will be an ideal response?
First solution, with tr:
text="$(echo $text | tr -d ' ')"
Second solution, with sed:
text="$(echo $text | sed 's/ //g')"
Computer Science & Information Technology
You might also like to view...
Write a complete Java console application that prompts the user for two numbers, multiplies the numbers, and then displays the result to the user.
What will be an ideal response?
Computer Science & Information Technology
When returning an array reference, square brackets are included with the return type in the method header.
Answer the following statement true (T) or false (F)
Computer Science & Information Technology