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


Please Help Members By Posting Answers For Below Questions

Using set -A write a script to print the output of the ls command in 5 columns with two spaces between each column. Pretend that ls does not have multicolumn output.

2029


Is shell scripting a programming language?

574


What is bash used for?

577


Why are there shells on the beach?

591


What language is shell scripting?

579






What makes c shell a more preferable option than the bourne shell?

534


What does $@ mean in shell?

590


What is the fastest scripting language?

547


What is c in shell script?

632


What is a program shell?

568


What happens on a system call?

558


What is shell variable?

525


Can shell script run on windows?

562


How does path variable work?

543


What are the default permissions of a file when it is created?

496