Re: Create log file from script code..
- From: "Chris F.A. Johnson" <cfajohnson@xxxxxxxxx>
- Date: Thu, 30 Mar 2006 17:46:14 -0500
On 2006-03-30, Geir Holmavatn wrote:
"Bit Twister" <BitTwister@xxxxxxxxxxxxxxxx> skrev i melding
news:slrne2oj19.3lu.BitTwister@xxxxxxxxxxxxxxxxxx
Hi, and thanks for the answer.
I forgot to say this this is with mOnOwall which is based on FreeBSD, if
that makes any difference.
lots of code examples in /etc/init.d
The mOnOwall distro unfortunately does not have any /etc/init.d folder
echo "MyScript started $(date) " >> /tmp/cronjobs.log
However I get an illegal variable name at the $(date) statement. Maybe the
FreeBSD has a completely other syntax..?
Unless /bin/sh is not a POSIX shell (which it normally is on
FreeBSD), that should work.
Try it with a Bourne shell syntax:
echo "MyScript started `date` " >> /tmp/cronjobs.log
If that works, you are dealing with a Bourne shell rather than a
POSIX shell (such as bash or ksh).
I realise that it might probably be more appropriate to ask in a FreeBSD
group...
If it's a shell scripting question, it would be more appropriate in
comp.unix.shell.
--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
.
- References:
- Create log file from script code..
- From: Geir Holmavatn
- Re: Create log file from script code..
- From: Bit Twister
- Re: Create log file from script code..
- From: Geir Holmavatn
- Create log file from script code..
- Prev by Date: Re: SAMBA -- automatic remounting
- Next by Date: Re: Create log file from script code..
- Previous by thread: Re: Create log file from script code..
- Next by thread: Re: Create log file from script code..
- Index(es):
Relevant Pages
|