Script challenge

2006-01-14 Thread John Smith
Hi All, which heroe can tell me why the following does not work : #!/bin/sh cat EOF newscriptfile.sh #!/bin/sh NOWS=$(date +%S) NOWS=${NOWS#0} NOWM=$(date +%M) NOWM=${NOWM#0} NOWH=$(date +%H) NOWH=${NOWH#0} FROMNOW=$1 MINUTE=$((${NOWM} + ${FROMNOW})) MINUTE=$((${MINUTE} % 60))

Re: Script challenge

2006-01-14 Thread Matthijs
On Sat, 14 Jan 2006 11:40:13 +0100, John Smith [EMAIL PROTECTED] wrote: which heroe can tell me why the following does not work : #!/bin/sh cat EOF newscriptfile.sh #!/bin/sh NOWS=$(date +%S) NOWS=${NOWS#0} NOWM=$(date +%M) NOWM=${NOWM#0} NOWH=$(date +%H) NOWH=${NOWH#0}

Re: Script challenge

2006-01-14 Thread Simo Kauppi
On Sat, Jan 14, 2006 at 11:37:42AM +0100, John Smith wrote: Hi All, which heroe can tell me why the following does not work : #!/bin/sh cat EOF newscriptfile.sh [snip] It's driving me nuts!!! Sincerely, Jan. Depending on what you want cat to the newscriptfile.sh, you

Re: Script challenge

2006-01-14 Thread David Jardine
On Sat, Jan 14, 2006 at 11:37:42AM +0100, John Smith wrote: Hi All, which heroe can tell me why the following does not work : #!/bin/sh cat EOF newscriptfile.sh #!/bin/sh NOWS=$(date +%S) NOWS=${NOWS#0} NOWM=$(date +%M) NOWM=${NOWM#0} NOWH=$(date +%H) NOWH=${NOWH#0}

Re: Script challenge

2006-01-14 Thread Almut Behrens
On Sat, Jan 14, 2006 at 02:39:17PM +0200, Simo Kauppi wrote: On Sat, Jan 14, 2006 at 11:37:42AM +0100, John Smith wrote: #!/bin/sh cat EOF newscriptfile.sh [snip] It's driving me nuts!!! Depending on what you want cat to the newscriptfile.sh, you need to escape all the $s to

Re: Script challenge

2006-01-14 Thread David Jardine
On Sat, Jan 14, 2006 at 01:49:07PM +0100, David Jardine wrote: On Sat, Jan 14, 2006 at 11:37:42AM +0100, John Smith wrote: Hi All, which heroe can tell me why the following does not work : #!/bin/sh cat EOF newscriptfile.sh #!/bin/sh NOWS=$(date +%S) NOWS=${NOWS#0}

Re: Script challenge

2006-01-14 Thread John Smith
On Sat, 14 Jan 2006 12:26:35 +0100 Matthijs [EMAIL PROTECTED] wrote: On Sat, 14 Jan 2006 11:40:13 +0100, John Smith [EMAIL PROTECTED] wrote: which heroe can tell me why the following does not work : #!/bin/sh cat EOF newscriptfile.sh #!/bin/sh NOWS=$(date +%S)

Re: Script challenge

2006-01-14 Thread John Smith
On Sat, 14 Jan 2006 11:37:42 +0100 John Smith [EMAIL PROTECTED] wrote: which heroe can tell me why the following does not work : #!/bin/sh cat EOF thenewscriptfile.sh #!/bin/sh ... input for thenewscriptfile.sh EOF It's driving me nuts!!! That's why I like Debian, and