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
What is the syntax of "nested if statement" in shell scripting?
What are the advantages of shell scripting?
What are zombie processes?
What is the use of a shebang line?
How can I set the default rwx permission to all users on every file which is created in the current shell?
I want to monitor a continuously updating log file, what command can be used to most efficiently achieve this?
What is in a script?
What is the difference between break and continue commands?
What does $1 mean in bash?
How will you emulate wc –l using awk?
What is gui scripting?
i have 2 tables 4 colums table 1 respective values a1 6, a2 8,a3 9,a4 14 & table 2 respective values a1 6, a2 8, a3 9, a4 12. if compare 2 tables 3 colums values same then 4th column values 1)Qes diff >5 then (5 * diff value ) 2)Qes diff <5 the 5 3)Qes diff 5 then 5 print respective values..
Differentiate between ‘ and ” quotes.
Explain about echo command?
What is meant by $1 in shell script?