I want to run the command rm -rf lib && some command which removes the lib/ directory, then builds my project which gets outputted to lib/.
The rm will fail if lib/ doesn't exist and won't execute the second command. How can I format this such that it will wait until the first command is done before starting the second and will continue to the second even if there is an error.
1 Answer
Use a semi-colon (;) to separate the commands instead.
For more information see this Unix thread: