How to group the commands in shell scripting?

Answers were Sorted based on User's Feedback



How to group the commands in shell scripting?..

Answer / linuxdemon(vjsujay@gmail.com)

(unix cmd 1; unix cmd2)

eg:

ubuntu@ubuntu:~$ (w > fname ; wc -l fname)
10 fname
ubuntu@ubuntu:~$

Is This Answer Correct ?    10 Yes 2 No

How to group the commands in shell scripting?..

Answer / tony

The command separator is ;

So, just run:

$ echo Let me wait some time ; sleep 10 ; echo Yes, that is OK

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Shell Script Interview Questions

What is egrep?

2 Answers  


How do I run a .sh file on mac?

0 Answers  


What is an sh file?

0 Answers  


How to print all the arguments provided to the script?

0 Answers  


what is the difference between cmp and diff commands

2 Answers   Amazon, CTS,






How do I read a .sh file?

0 Answers  


How would you compare the strings in a shell script?

0 Answers  


Write a script to print the first 10 elements of fibonacci series.

0 Answers  


what is info area how many types?

0 Answers  


What is the first line in every perl script called?

0 Answers  


why did you apply to shell

3 Answers   Shell,


How do scripts work?

0 Answers  


Categories