Zip file making issues
m.seaman at infracaninophile.co.uk
Tue Sep 21 05:14:28 UTC 2010
On 21/09/2010 04:53:58, Ryan Coleman wrote:
> As I said in my OP: I could just run a "cd" to the directory parent
> and do it there - that would solve the problem - but that's simply
> too dangerous if the script generator throws an error on the next set
> of commands (a risk I do not want to take).
Um.... changing directory *is* the way to solve this. Really.
What you can do in a shell script is work in a sub-shell: that way,
even if your zip command goes bananas, you are automatically returned to
your original working directory. To create a sub-shell, just enclose
your commands in (brackets).
cd /mount/archive/orders/Sep20/1284343047-Le-ach/ ;
Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard
PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate
JID: matthew at infracaninophile.co.uk Kent, CT11 9PW
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 267 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20100921/e04a53e6/signature.pgp
More information about the freebsd-questions