Re: Need help with shell script.

"Stanislav N. aka pztrn" <[email protected]>
Newsgroups comp.os.linux.misc
Organization oldproto.ru NNTP server
Message-ID <[email protected]>
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


-- 
WBR, Stanislav Nikitin a.k.a. pztrn.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.