Board logo

标题: [文件操作] shell中判断字符串是否为空的命令换成bat是什么? [打印本页]

作者: sanne8050    时间: 2013-9-30 14:40     标题: shell中判断字符串是否为空的命令换成bat是什么?

shell中if [ -z "$1" ]换成bat中表示什么
作者: DAIC    时间: 2013-9-30 16:20

  1. @echo off
  2. set strA=
  3. set strB=bat
  4. if "%strA%" equ "" (
  5.     echo null
  6. ) else (
  7.     echo not null
  8. )
  9. if "%strB%" equ "" (
  10.     echo null
  11. ) else (
  12.     echo not null
  13. )
  14. pause
复制代码





欢迎光临 批处理之家 (http://www.bathome.net/) Powered by Discuz! 7.2