www.cnblogs.com/ruiyqinrui

开源、架构、Linux C/C++/python AI BI 运维开发自动化运维。 春风桃李花 秋雨梧桐叶。“力尽不知热 但惜夏日长”。夏不惜,秋不获。@ruiY--秦瑞

python爬虫,C编程,嵌入式开发.hadoop大数据,桉树,onenebula云计算架构.linux运维及驱动开发.

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

@echo off
rem  *****************************************************
rem  Create By Q_rui CopryRight@_   www.yoodo.com
rem  Mail:  rui.qin@yoodo.com
rem  Version V1.0 beat
rem  2013-08-*
rem  Blog:  cnblogs.com/rui
rem  *****************************************************

::【Scripts aim function area】
echo Current time:  %date%,%time%
echo Current directory:  %cd%
echo Local host system type:  %OS%
echo "Current running filename:" %0
echo "this bat scripts first paramenters:" %1
::echo "this is scripts run result:" %!
::for /f %%i in (./websites.txt) do G:\monitor\curl -I %%i
if "%0" == "cmd.bat" type %0



::【Comment area】
::G:\monitor\curl --connect-timeout 12 --max-time 10 -o > nul -s -w %{http_code} http://192.168.1.109
echo "" >>nul

::linux and windows shell,bat传参问题
::   #linux sys
::   #!/bin/sh
::   在linux系统中像如上指定$1要求传参,但是当在执行时不加参时linux-shell事不会报错及提示的,但是我们可以用脚本实现简单的使用提示及帮助
::   if [[ $# -eq 1 ]];
::     echo "usage: sh $0 filename"
::   fi
::   file $1    #查看由$1传入的文件名及目录等的参数,
::
::   ::windows sys
::   @echo off
::   type %1
::   if "%1"=="a" format a:
::   if exist g:\monitor\monitors\bat\cmd.bat type
::   bat和shell有太多的偶然性相似,bat程序运行结束会返回一个数值表示运行程序的运行结果,


pause
echo "Next see you,bye!"
pause

posted on 2013-09-06 16:10  秦瑞It行程实录  阅读(1237)  评论(0编辑  收藏  举报
www.cnblogs.com/ruiyqinrui