[lug] bash script functions

Ken Weinert kenw at ihs.com
Tue Nov 6 12:37:48 MST 2001


> * Jason Davis (jd_480 at hotmail.com) wrote:
> > hi,
> > 
> > im runnina bash script to back up files. i use a function
> > that determines if the file i want to backup has been created for the day
> > then responds accordingly...works but bash tries to interpert echos that
> > i do in the function as commands..giving me trival errors like command
> > does not exist. script below...(some stuff wraped by hotmail)

// script parts elided

> > $(ROTATE)
> > $(GETZIP)

why are you executing these in a subshell? Shouldn't this just be:

ROTATE()
GETZIP()

???

-- 
Ken Weinert   kenw at ihs.com 303-858-6956 (V) 303-705-4258 (F)
GnuPG KeyID: 9274F1CE           GnuPG available at http://www.gnupg.org/
GnuPG Key Fingerprint: 1D87 3720 BB77 4489 A928  79D6 F8EC DD76 9274 F1CE
Linux 2.2.14: up 3 days, 20:46,
I don't know HOW, but somehow I got poison ivy on my brain.  The only
way I can scratch it is to think about sandpaper. - Steven Wright

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 240 bytes
Desc: not available
URL: <http://lists.lug.boulder.co.us/pipermail/lug/attachments/20011106/7b1d1651/attachment.pgp>


More information about the LUG mailing list