Re: Need help with shell script.
pH <[email protected]>
| Newsgroups | comp.os.linux.misc |
|---|---|
| Organization | A noiseless patient Spider |
| Message-ID | <[email protected]> |
On 2026-08-10, Stanislav N. aka pztrn <[email protected]> wrote: > 10.08.2026 16:12, The Natural Philosopher wrote: >> The behaviour you describe is hauntingly familiar, but I cannot recall why... > > On my systems (arch and debian) that behavior was observed only if: > > 1. Script has no executable bit set. > 2. Commands in script returns anything other than 0 > > Probably it's #2 and I propose to change script into this: > > #!/bin/bash, > mv ~/Desktop/*JPG ~/Desktop/Beckys_stuff/ || true > mv ~/Desktop/*PDF ~/Desktop/Beckys_stuff/ || true > > Or even better: > > #!/bin/bash, > > set +e > > mv ~/Desktop/*JPG ~/Desktop/Beckys_stuff/ > mv ~/Desktop/*PDF ~/Desktop/Beckys_stuff/ > > set -e > > Thanks for the response. Even though I've got the thing working "well enough", I think I will give this a try and see if the "launcher" complains. (and you made me read up on "set"...always a good thing to learn a bit) pH