[techtalk] Stumped by shell script

Almut Behrens almut_behrens at yahoo.com
Tue May 29 09:24:50 EST 2001


On Mon, May 28, 2001 at 09:35:55PM -0700, Nancy Corbett wrote:
> 
> The first one, however, within the
> sed statement, is not returning the current date within the output file.
> It's replacing DATE with "$1".  Where's it getting that?  Sheesh!

hmm, I have no idea why that is :)
I just tried it on my 'puter and it works flawlessly...

You might try putting a "set -x" on a single line at the beginning of
the script to switch on debugging mode. It'll then print step by step
what it's doing. The output may not be the most trivial to interpret
when using 'eval's, but I guess you'll somehow figure it out ;)
At least, you might get an idea where the '$1' is sneaking in...

A couple of 'echo's of intermediate values might also help.

If that doesn't get you any further, don't hesitate to post again
*exactly what you have* (often it's only a single char...) -- I'm sure
we'll get this worked out...

- Almut





More information about the Techtalk mailing list