If you have a string "one two three", which shell command
would you use to extract the strings?

Answer Posted / seshadri sethi

echo $string | cut -d” ” -f1
echo $string | cut -d” ” -f2
echo $string | cut -d” ” -f3

Is This Answer Correct ?    5 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you debug a script?

567


What are the 3 standard streams in linux?

572


Explain how you Automate your application using Shell scripting.

1849


Is shell a scripting language?

572


How many fields are present in a crontab file and what does each field specify?

585






Why is the use of shell script?

543


What is path variable bash?

573


How do I run a .sh file?

615


What is the command to find out users on the system?

572


What is the first line of a shell script called?

571


How do I open a jshell in cmd?

598


How can you find out how long the system has been running?

528


What is @echo off?

569


What happens on a system call?

562


How do I debug a shell script?

565