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 |
Script S1 (which copies .dat files from one directory1 to another directory2) run continuously. Write Script S2 which kills S1 first, compresses all .dat files in directory1 and directory2 successfully, re-run Script S1 and stops self i.e. S2.
In a single command how do you run the previous command in the command prompt.
What are the 3 standard streams in linux?
What is another name for a bash shell script that you might see?
how to delete all the files with extension .dat rom a directory tree from root to third level in a single unix command?
Why is a script important?
What is basename in shell script?
how to print the matrix form of 2-d, 3-d arrays in unix c shell scripts ?
What are types of shells?
Write a shell program to test whether a given number is even or odd?
How can I send a mail with a compressed file as an attachment?
What are scripts in psychology?