I'm trying to run multiple commands on things I have found, how can I achieve this?
find . -exec cmd1; cmd2
does not seem to work; it instead runs cmd2 after cmd1 has been executed on every file.
|
I'm trying to run multiple commands on things I have found, how can I achieve this?
does not seem to work; it instead runs cmd2 after cmd1 has been executed on every file. |
|||
|
|
|
In this demonstration, I'll use
A real command of this type would look like:
In the second set, the escaped parentheses group the two From
|
|||
|
|
|
If you don't matter about cmd1 being able to prevent cmd2 from being run due to the error code
The only reliable way to get both commands to always run this is to have
|
||||
|
|