Command execution order
Appreciate for the fast reply
Dear Friends, I have a script which has 2 commands in it. Command 1 takes long time to do its job. ex: vi t.ksh #bin/bash grep "m" *.txt ---command 1 grep "t" *.ksh ---command 2 Is there a way that i don't wait the completion of command 1 in script and script proceed with next execution of command.? Regads, Mahendra Singh |
Yes, append at end of command "&". It will send this process to background.
Code:
#!/bin/bash |
Quote:
I did but its still throwing the output on console for first command? |
Quote:
|
And what you want to do with the output of first command?
|
Code:
reza@reza-HP-1000:~$ cat /etc/passwd |grep 'root' &>file & and with the & at the end of the line you send the process to the background if you have problem with lastLine,,youcan read the file & delete the last line with sed command |
Hi All,
Yes issue got resolved, I have put the first process or command background(&) and the next command got executed. Thank you |
All times are GMT -5. The time now is 07:46 PM. |