multiple commands in one file?
Go to solution
Solved by WkdPaul,
Here :
Option A
#!/bin/bash
# Run copy and then the application, regardless of success of the copy
cp /home/usr/dir/file /home/usr/destination/; /usr/bin/application
exit 0
Option B
#!/bin/bash
# Run the application only if the copy succeeded
cp /home/usr/dir/file /home/usr/destination/ && /usr/bin/application
exit 0
Option C
#!/bin/bash
# Run copy in the background, then runs the application, regardless of what happens to the copy
cp /home/usr/dir/file /home/usr/destination/ & /usr/bin/application
exit 0
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now