一段語法詢問 - Linux

By Elvira
at 2018-07-13T20:02
at 2018-07-13T20:02
Table of Contents
#!/bin/bash
tmp=`mktmp /tmp/dialog.XXX`
def=text
a="input the password"
dialog --insecure --passwordbox "$a" 10 40 2>"tmp"
pwd=$(cat $tmp)
[ -z "$pwd" ] && pwd=$def
rm "$tmp"
請問上列 [ -z "$pwd" ] 的意思
--
tmp=`mktmp /tmp/dialog.XXX`
def=text
a="input the password"
dialog --insecure --passwordbox "$a" 10 40 2>"tmp"
pwd=$(cat $tmp)
[ -z "$pwd" ] && pwd=$def
rm "$tmp"
請問上列 [ -z "$pwd" ] 的意思
--
Tags:
Linux
All Comments

By Olive
at 2018-07-15T10:14
at 2018-07-15T10:14

By John
at 2018-07-16T14:13
at 2018-07-16T14:13
Related Posts
gvim tabedit的問題

By Lucy
at 2018-07-13T00:36
at 2018-07-13T00:36
樹莓派重開機後資料消失(回朔)

By Audriana
at 2018-07-12T17:15
at 2018-07-12T17:15
reverse proxy server ssl 加密法認定問題

By Thomas
at 2018-07-12T16:23
at 2018-07-12T16:23
設定不同帳戶的預設桌面環境

By Enid
at 2018-07-12T10:15
at 2018-07-12T10:15
ASUS E203NA 裝 Linux

By Robert
at 2018-07-11T16:45
at 2018-07-11T16:45