bash syntax for if [[ ]]
This commit is contained in:
parent
dfd13dca60
commit
84f7d4dc0c
2 changed files with 3 additions and 3 deletions
|
@ -10,7 +10,7 @@ export OUTPUT_DIR
|
|||
export SNAPSHOT_D
|
||||
mkdir -p $OUTPUT_DIR
|
||||
|
||||
if [ ! -f $OUTPUT_DIR/dmidecode ] ; then
|
||||
if [[ ! -f $OUTPUT_DIR/dmidecode ]] ; then
|
||||
dmidecode > $OUTPUT_DIR/dmidecode
|
||||
fi
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ -z $OUTPUT_DIR ] ; then
|
||||
if [[ -z $OUTPUT_DIR ]] ; then
|
||||
source scan-dmidecode
|
||||
fi
|
||||
|
||||
|
@ -9,7 +9,7 @@ for DEV in \
|
|||
`cat /proc/net/dev | grep ':' | cut -d ':' -f 1`
|
||||
do
|
||||
MAC=`ethtool -P $DEV | cut -d ':' -f 2-9 | sed 's/\s\+//g'`
|
||||
if [ "$MAC" != "00:00:00:00:00:00" ] ; then
|
||||
if [[ "$MAC" != "00:00:00:00:00:00" ]] ; then
|
||||
#echo "$DEV $MAC"
|
||||
echo "$DEV $MAC" >> $OUTPUT_DIR/netdev.lst
|
||||
mkdir -p $OUTPUT_DIR/netdev
|
||||
|
|
Loading…
Reference in a new issue