How can I make this if's work in Bash ?
- by Dragos
In bash how can I make a construction like this to work:
if (cp /folder/path /to/path) && (cp /anotherfolder/path /to/anotherpath)
then
echo "Succeeded"
else
echo "Failed"
fi
The if should test for the $? return code of each command and tie them with &&.
How can I make this in Bash ?