[NTLUG:Discuss] set -x not working! was: what is ":bad option"?
m m
llliiilll at hotmail.com
Sun Jul 23 04:35:32 CDT 2000
Hi all:
I have tried:
set -x
#!/bin/sh -e
if give me:
set: unknow option
: command not found
'/svscan: syntax error near unexpected token `in
'/svscan: ./svscan: line 6: `case "$1" in
if I try:
#!/bin/sh -x
still get :bad option.
the following is the code.
#!/bin/sh -e
# /etc/init.d/svscan : start or stop svscan.
# borrowed from http://Web.InfoAve.Net/~dsill/lwq.html#start-qmail
# modified by Adam McKenna <adam at flounder.net>
case "$1" in
start)
echo -n "Starting djb services: svscan "
env - PATH="/usr/local/bin:$PATH" svscan /service &
echo $! > /var/run/svscan.pid
echo "."
;;
stop)
echo -n "Stopping djb services: svscan "
kill `cat /var/run/svscan.pid`
echo -n "services "
svc -dx /service/*
echo -n " logging "
svc -dx /service/*/log
echo "."
;;
restart|reload|force-reload)
$0 stop
$0 start
;;
*)
echo 'Usage: /etc/init.d/svscan {start|stop|restart}'
exit 1
esac
exit 0
can anyone help?
TIA
>From: Cameron <hrothgar at endor.hsutx.edu>
>
>
>well, i like bash ;), and it is possible. either pass "-x" as a
>parameter on the first line like:
>
> #!/bin/bash -x
>
>or use set:
>
> set -x
>
>you can turn it off by:
>
> set +x
>
>hope this helps...
>--
>cameron
>
>_______________________________________________
>http://ntlug.org/mailman/listinfo/discuss
________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
More information about the Discuss
mailing list