I want to run two different programs from the command line in Ubuntu. Each has its own set of arguments. However, I want to wait for 5 seconds between launching the first program and the second. How can I enforce this wait?
我想从Ubuntu的命令行运行两个不同的程序。每个都有自己的一组参数。但是,我想在启动第一个程序和第二个程序之间等待5秒钟。我该如何强制执行此等待?
Thus far, I have:
到目前为止,我有:
$ ./Program1 -a -b && ./Program2 -c -d
But I need to insert a wait between the two programs, and I want to do this all in one line on the command line. Is this possible?
但我需要在两个程序之间插入一个等待,并且我想在命令行中的所有行中执行此操作。这可能吗?
1 个解决方案
#1
Yes it's possible:
是的,这是可能的:
./Program1 -a -b && sleep 5 && ./Program2 -c -d
./Program1 -a -b && sleep 5 && ./Program2 -c -d
#1
Yes it's possible:
是的,这是可能的:
./Program1 -a -b && sleep 5 && ./Program2 -c -d
./Program1 -a -b && sleep 5 && ./Program2 -c -d