诡异!在solaris中使用crtontab时不成功的问题!!急求救!!!
公司原有台服务器是freebsd的,这次要迁移到另一台solaris上去,于是把freebsd上原来的crontab的文件搬到了solaris上去,原来的crontab文件开头是这样的,导入环境变量的内容:
[10:27:17 gateway@ ~]$ crontab -l
PATH=$PATH:.
AD_ROOT=/data0/apache/cgi-bin/adsys
GW_ROOT=/data0/publish_data
GW2_ROOT=/data0/publish_data
#程序用途
1 * * * * /data0/apache/cgi-bin/adsys/schedule/ad_log2db.pl > /tmp/log2db.log 2>&1
0 * * * * /data0/apache/cgi-bin/adsys/schedule/ad_report.pl today
把上面的crontab全部注释之后搬到solaris上时,是这样的
[10:25:37 gateway@ /data1/apache/share]$ crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.KysOr3SZuf installed on Mon Apr 19 12:45:05 2004)
# (Cron version -- $FreeBSD: src/usr.sbin/cron/crontab/crontab.c,v 1.12.2.4 2001/06/16 03:18:37 peter Exp $)
#PATH=$PATH:.
#AD_ROOT=/data0/apache/cgi-bin/adsys
#GW_ROOT=/data0/publish_data
#GW2_ROOT=/data0/publish_data
但是在去除环境变量前的注释#时,报错!
错误信息为:
PATH=$PATH:.
crontab: error on previous line; unexpected character found in line.
AD_ROOT=/data0/apache/cgi-bin/adsys
crontab: error on previous line; unexpected character found in line.
GW_ROOT=/data0/publish_data
crontab: error on previous line; unexpected character found in line.
GW2_ROOT=/data0/publish_data
crontab: error on previous line; unexpected character found in line.
crontab: errors detected in input, no crontab file generated.
再用crontab -l看一下,注释无法去除,特向大家求救!!这究竟错在哪里??怎么才能
让我的环境变量起作用呢???拜求!!!!