Re: Script Help (Bash) SOLVED

2013-09-30 Thread Cameron Simpson
| > On Sat, Sep 28, 2013 at 6:21 AM, Frank Murphy | > wrote: [...] | > > #!/bin/bash Unless I really need bash, I use: #!/bin/sh More portable. You'll be surprised how little bash actually gives you in scripting scenarios. | > > ## Download no-bebug rawhide kernel | > > /usr/bin/cd /var/cac

Re: Script Help (Bash) SOLVED

2013-09-30 Thread Frank Murphy
On Sat, 28 Sep 2013 10:31:07 -0500 inode0 wrote: > On Sat, Sep 28, 2013 at 6:21 AM, Frank Murphy > wrote: > > Still haven't mastered bash, not even a jack ( > > > > Have strung some command(s) together in /etc/cron.daily > > > > #!/bin/bash > > ## Download no-bebug rawhide kernel > > /usr/bin/cd

Re: Script Help (Bash)

2013-09-28 Thread g
hi frankly, On 09/28/2013 11:30 AM, Frank Murphy wrote: On Sat, 28 Sep 2013 10:31:07 -0500 inode0 wrote: While there might be a cleaner way to detect that something was downloaded what I do is log the output from reposync and then if grep -q Download REPOSYNCLOG; then # do stuff when new

Re: Script Help (Bash)

2013-09-28 Thread inode0
On Sat, Sep 28, 2013 at 11:30 AM, Frank Murphy wrote: > On Sat, 28 Sep 2013 10:31:07 -0500 > inode0 wrote: > >> While there might be a cleaner way to detect that something was >> downloaded what I do is log the output from reposync and then >> >> if grep -q Download REPOSYNCLOG; then >> # do st

Re: Script Help (Bash)

2013-09-28 Thread Frank Murphy
On Sat, 28 Sep 2013 10:31:07 -0500 inode0 wrote: > While there might be a cleaner way to detect that something was > downloaded what I do is log the output from reposync and then > > if grep -q Download REPOSYNCLOG; then > # do stuff when new things were synced > fi > > John With bash would

Re: Script Help (Bash)

2013-09-28 Thread inode0
On Sat, Sep 28, 2013 at 6:21 AM, Frank Murphy wrote: > Still haven't mastered bash, not even a jack ( > > Have strung some command(s) together in /etc/cron.daily > > #!/bin/bash > ## Download no-bebug rawhide kernel > /usr/bin/cd > /var/cache/yum/x86_64/20/fedora-rawhide-kernel-nodebug-source/pac

Re: Script Help (Bash)

2013-09-28 Thread Frank Murphy
On Sat, 28 Sep 2013 14:27:57 +0100 Junk wrote: > > reposync -p dest-dir would be easier. > > Junk That's cleaner, but how do I stop the script if nothing to sync. -- Regards, Frank www.frankly3d.com -- users mailing list users@lists.fedoraproject.org To unsubscribe or change subscripti

Re: Script Help (Bash)

2013-09-28 Thread Junk
On 28 Sep 2013, at 14:19, Frank Murphy wrote: > On Sat, 28 Sep 2013 13:55:15 +0100 > "Patrick O'Callaghan" wrote: > >> On Sat, Sep 28, 2013 at 12:21 PM, Frank Murphy >> wrote: >> >>> /usr/bin/cd >> >> >> Without looking any further, this is clearly wrong. Even if there >> is a /usr/bin/c

Re: Script Help (Bash)

2013-09-28 Thread Frank Murphy
On Sat, 28 Sep 2013 13:55:15 +0100 "Patrick O'Callaghan" wrote: > On Sat, Sep 28, 2013 at 12:21 PM, Frank Murphy > wrote: > > > /usr/bin/cd > > > Without looking any further, this is clearly wrong. Even if there > is a /usr/bin/cd file (see recent discussion) in order to have any > effect on

Re: Script Help (Bash)

2013-09-28 Thread Patrick O'Callaghan
On Sat, Sep 28, 2013 at 12:21 PM, Frank Murphy wrote: > /usr/bin/cd Without looking any further, this is clearly wrong. Even if there is a /usr/bin/cd file (see recent discussion) in order to have any effect on the current directory used by subsequent commands you *have* to use the Shell built-