How to group the commands in shell scripting?
Answers were Sorted based on User's Feedback
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 |
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 |
What are the default permissions of a file when it is created?
What is console line?
A file has multiple records each having three 30-bit long fields(field1,field2,field3).There is also a lookup file,LOOK_UP.dat.Now, we need to consider only the last ten digits of field1 and lookup the file LOOK_UP.dat. If there a match then field2 and field3 should replaced with corresponding data from the lookup file. otherwise that particular record,for which there is no match, should be stored in a seperate file.
Which shell is the best?
What are the different methods available to run a shell script?
What is the default ubuntu terminal?
What are the 3 standard streams in linux?
How to print all array elements and their respective indexes?
What is the difference between a shell variable that is exported and the one that is not exported?
What does it mean to debug a script?
What does debug script mean?
What is the use of a shebang line?