17.10.2019 20:32, Istvan Gabor пишет:
On Thu, 17 Oct 2019 20:04:47 +0300, Andrei Borzenkov wrote:
17.10.2019 19:58, Istvan Gabor пишет:
"program && ; cp file to copy" works for me, it seems.
Either "&&" or ";" is redundant. This command line executes cp unconditionally. If this is what you want, "&&" is not needed. If you want to perform copy only after program completed successfully, ";" should be removed.
Thanks, Andrei.
If I understand correctly I can have (replacing ; by newline):
either:
#! /bin/bash program cp original copy
This unconditionally does the copy independently from program exit status.
or:
#! /bin/bash program && cp original copy
This does copy only if the exit status of program is successful.
Is this correct?
Yes. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org