Re: simple zip via cron problem





robert wrote:

Hi all, allow the example to explain. This works:

cd /usr/local/builds/checkout/at_branch1/applications/AlphaTheoryWeb/
src/java/
zip -r /tmp/at_src.zip *
adding: com/ (stored 0%)
...

The problem: I can't change to a dir in a script running via cron - at
least it didn't seem to work. If I run this script:

#!/bin/bash

/usr/bin/zip -r /tmp/at_src.zip /usr/local/builds/checkout/at_branch1/
applications/AlphaTheoryWeb/src/java/*

exit

I get:
adding: usr/local/builds/checkout/at_branch1/applications/
AlphaTheoryWeb/src/java/com/

I don't want 'usr/local/builds/checkout/at_branch1/applications/
AlphaTheoryWeb/src/java/' part of the filenames , just com and below .
I did man zip , and after trying -j and -i I can't get the effect I
want. Any ideas ?



What's wrong with

#!/bin/bash

cd /usr/local/builds/checkout/at_branch1/applications/AlphaTheoryWeb/src/java
/usr/bin/zip -r /tmp/at_src.zip *

exit


You should be able to cd to the directory. If this doesn't work then send us the error message you get.

Good luck,

Steve

.



Relevant Pages

  • How do I check for a message with quotes in an EXPECT script
    ... I have an Expect Script running and I want to check for a particular ... Notice the double quotes above as part of the message. ... following in my Expect Script but it did not capture this error (I ...
    (comp.lang.tcl)
  • simple zip via cron problem
    ... I can't change to a dir in a script running via cron - at ... AlphaTheoryWeb/src/java/' part of the filenames, ...
    (comp.os.linux.misc)
  • script running under cron destroys files
    ... I have a script running under cron which backs up mail folders. ... the o/s is suse entreprise linux 8 ...
    (comp.unix.shell)
  • Re: Scripting backup of file naming?
    ... > be distinctive both to allow for reference when needing to restore a ... > Is there a simple way to do this with a script running from cron? ... you want to run and use cron to call it periodically. ...
    (freebsd-questions)
  • Re: Expect and backspace characters
    ... >I have an Expect script running from the Cron, ... >filter out the local echo and / or the backspace characters that are ...
    (comp.lang.tcl)