-2

I want to run a command in Linux after completion of another command (without using sleep). Example : i run a command for print contents of file after 3 days so i want that after 3 days when file is completely printed then my other command runs.

Blink
  • 17
  • 2
  • 1
    I reread the question several times, I'm still not 100% sure what you are asking. So perhaps add a little more context. If you are in a shell and want commands to run serially you can put them on the same command line separated by a ;. For example `ls; echo done` the `echo` command won't start until after `ls` has completed. The same thing can trivially be done in a shell script. – Richard Feb 01 '22 at 04:55

1 Answers1

0

One method has already been mentioned to you if you want successful completion of 1st and afterwards only the 2nd command should execute then you can use & . Ex - cmd1 && cmd2 . If there is something else that you need, adding more context would be better.

Bitlist
  • 1
  • 2