当前位置: 技术问答>linux和unix
求助 请教各位大人 SHELL编程
来源: 互联网 发布时间:2015-12-25
本文导语: 怎么可以写一个在SOLARIS下执行PHP语言的Shell脚本.DOS下的批处理文件如下所示. @echo off rem ---------------------------------------------------------------------------- rem PGID rem 组织登陆 rem importDivision {supplier|buyer} CSVfilen...
怎么可以写一个在SOLARIS下执行PHP语言的Shell脚本.DOS下的批处理文件如下所示.
@echo off
rem ----------------------------------------------------------------------------
rem PGID
rem 组织登陆
rem importDivision {supplier|buyer} CSVfilename
rem {-console | -errlog errlogFile }{ -force recordFile | -pre }
rem
rem author 1111
rem version Revision: 1.00
rem 22
rem 33
rem copyright
rem ----------------------------------------------------------------------------
setlocal
rem 环境设定
set NLS_DATE_FORMAT=YYYY/MM/DD
set NLS_TIMESTAMP_FORMAT=YYYY/MM/DD HH24:MI:SSXFF
rem PHP
set PHP_HOME=c:php
set PHP_EXE=%PHP_HOME%php.exe
set CMD_HOME=C:Temp
set DATA_HOME=C:Temp
set RCV_BK=%DATA_HOME%commandsrcv_bk
set SND_BK=%DATA_HOME%commandssnd_bk
pause
rem 命令实行
call %PHP_EXE% %CMD_HOME%importDivision.php %*
@echo off
rem ----------------------------------------------------------------------------
rem PGID
rem 组织登陆
rem importDivision {supplier|buyer} CSVfilename
rem {-console | -errlog errlogFile }{ -force recordFile | -pre }
rem
rem author 1111
rem version Revision: 1.00
rem 22
rem 33
rem copyright
rem ----------------------------------------------------------------------------
setlocal
rem 环境设定
set NLS_DATE_FORMAT=YYYY/MM/DD
set NLS_TIMESTAMP_FORMAT=YYYY/MM/DD HH24:MI:SSXFF
rem PHP
set PHP_HOME=c:php
set PHP_EXE=%PHP_HOME%php.exe
set CMD_HOME=C:Temp
set DATA_HOME=C:Temp
set RCV_BK=%DATA_HOME%commandsrcv_bk
set SND_BK=%DATA_HOME%commandssnd_bk
pause
rem 命令实行
call %PHP_EXE% %CMD_HOME%importDivision.php %*
|
export NLS_DATE_FORMAT=YYYY/MM/DD
export NLS_TIMESTAMP_FORMAT=YYYY/MM/DD HH24:MI:SSXFF
export PHP_EXE=$PHP_HOME/php.exe
export CMD_HOME=/temp
export DATA_HOME=/Temp
export RCV_BK=$DATA_HOME%/commands/rcv_bk
export SND_BK=$DATA_HOME%/commands/snd_bk
read
$PHP_EXE $CMD_HOME/importDivision.php $*
export NLS_TIMESTAMP_FORMAT=YYYY/MM/DD HH24:MI:SSXFF
export PHP_EXE=$PHP_HOME/php.exe
export CMD_HOME=/temp
export DATA_HOME=/Temp
export RCV_BK=$DATA_HOME%/commands/rcv_bk
export SND_BK=$DATA_HOME%/commands/snd_bk
read
$PHP_EXE $CMD_HOME/importDivision.php $*
|
I have answered your question in your another page. please check.
just download "UNIX shells by example".
chapter 10.5, table 10.4
just download "UNIX shells by example".
chapter 10.5, table 10.4
|
export NLS_DATE_FORMAT=YYYY/MM/DD
export NLS_TIMESTAMP_FORMAT=YYYY/MM/DD HH24:MI:SSXFF
export PHP_EXE=$PHP_HOME/php.exe
export CMD_HOME=/temp
export DATA_HOME=/Temp
export RCV_BK=$DATA_HOME%/commands/rcv_bk
export SND_BK=$DATA_HOME%/commands/snd_bk
pause
rem 命令实行
$PHP_EXE $CMD_HOME/importDivision.php $*
export NLS_TIMESTAMP_FORMAT=YYYY/MM/DD HH24:MI:SSXFF
export PHP_EXE=$PHP_HOME/php.exe
export CMD_HOME=/temp
export DATA_HOME=/Temp
export RCV_BK=$DATA_HOME%/commands/rcv_bk
export SND_BK=$DATA_HOME%/commands/snd_bk
pause
rem 命令实行
$PHP_EXE $CMD_HOME/importDivision.php $*
|
php程序可以直接运行php文件