In bash, I know what I should use &&if I want the command to be Brun only after the command is executed A:
A && B
But what if I want to Dstart only after A, Bis Ceverything successful? Is an
'A&B&C' && D
Ok
Besides, what should I do if I want to know exactly which command was unsuccessful, among A, Band C(since they will be executed many times, it will take some time if I check one by one).
Is it possible that error information will be automatically output to a text file as soon as any command is executed?
In my case A, B, Cthey are curl, and B- rmand my script is as follows:
for f in *
do
curl -T server1.com
curl -T server2.com
...
rm $f
done
source
share