Make a shell script MultiRun, which takes first Parameter as Command and runs this with remaining Parameters one at a time.
./MultiRun curl A B C D
Your Script should take curl as the command and run "curl A" , "curl B" , "curl C" , "curl D".
Now, because your script is in control, you can decide whether a failure in any one command will terminate the script or continue to next Parameter or wait for user input or whatever. You can even decide on the exit status of the whole script, based on the execution of the individual commands.
MultiRun Script can be something like this:
#! /bin/bash
COMMAND=$1
shift #### Remove COMMAND from existing Parameters
for PARAMETER in "$@" ; #### Process all remaining Parameters
do
$COMMAND $PARAMETER
# Check exit status and take action or wait for user input , if required
done
# Depending on the individual exit statuses , choose your exit status N with "exit $N"
Now execute this:
./MultiRun echo 1 2 3 4
to get output of "echo 1" , "echo 2" , "echo 3" , "echo 4" like this
1
2
3
4
It is a very flexible & reusable solution.
cmd -a; cmd -b; cmd -c
in long run, as all human beings do. – jimmij 22 hours agocommand
. In general case,command -a -b -c
,command -abc
andcommand -a && command -b && command -c
have different meaning.. – Dmitry Grigoryev 2 hours ago