I'm looking for something like command1 ; command2 i.e. how to run command2 after command1 but I'd like to plan execution of command2 when command1 is already running.
It can be solved by just typing the command2 and confirming by Enter supposed that the command1 is not consuming standard input and that the command1 doesn't produce to much text on output making it impractical to type (typed characters are blended with the command1 output).
fg ; command. Or evenfg && commandto only run the 2nd command / pipeline if the first one was successful. (You can still usebgwhile thinking / typing, if it doesn't spew text on the terminal.) – Peter Cordes Dec 14 '18 at 13:32command1; command2syntax. Could you please clarify this for me? – Haxiel Dec 14 '18 at 17:32$!to get the pid of backgrounded job. – D. Ben Knoble Dec 14 '18 at 18:19command1 & proceed_after=$!then when you've got the next command figured outwait -n $proceed_after; command 2– studog Dec 14 '18 at 18:27