If you have a string "one two three", which shell command
would you use to extract the strings?
Answer Posted / asit pal
echo $a | tr " " "\n" | head -1
echo $a | tr " " "\n" | head -2
echo $a | tr " " "\n" | head -3
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
How do I start a shell script?
What will happen to my current process when I execute a command using exec?
How do I read a .sh file?
How to print pid of the current shell?
Given a file find the count of lines containing the word "abc".
Is shell a part of kernel?
Rewrite the command to print the sentence and convert the variable to plural: echo “i like $variable”.
What is scripting used for?
How to calculate the number of passed arguments?
What is awk script?
What are the four fundamental components of every file system on linux?
How can I set the default rwx permission to all users on every file which is created in the current shell?
Explain about echo command?
How do I run a bin bash script?
I want to connect to a remote server and execute some commands, how can I achieve this?