如何在windows bat中写入相当于shell的内容

时间:2016-01-20 09:25:37

标签: windows batch-file

目前我的shell脚本显示如下,我需要写等效的 windows bat我是新手,尝试了一点但不确定它是否正确。请帮忙

Shell脚本:

 ./SetDate.sh $1
 until [[ $currentDate -eq $endDate ]] ; do

while read myline
do
    currentDate=$myline
done < currentDate.txt

    echo "The current date being processed is: " $currentDate 

# Invoke one day activity 
./OneDay.sh $currentDate

export ReturnCode=$?
if  [ ${ReturnCode} -ne 0 ];then
     echo "Running jobs failed. For more details see log files."
fi

# Go to the next day
./GetDate.sh
 done   

在窗户中尝试了一半但不确定。请在windows bat中提供相应的帮助。

until [[ %currentDate% EQ %endDate ]] ; do 

while read myline; 
do 
    currentDate = %myline% 
done <<currentDate.txt 

call OneDayActivity.bat %currentDate% 
set returnCode=%ERRORLEVEL% 
IF "%returnCode%" NEQ "0" ( 
  echo "Running jobs failed. For more details see log files." 
) 
call GetDate.bat 
:EOF

由于

0 个答案:

没有答案