bash 与列表(&&)
#!/bin/bash
#and list
if [ ! -z "$1" ]&&echo "argument #1=$1"&&[ ! -z "$2" ]&&echo "argment #2=$2"
then
echo "at least 2 argumnets passed to script."
else
echo "less than 2 arguments passed to script."
fi
#and list
if [ ! -z "$1" ]&&echo "argument #1=$1"&&[ ! -z "$2" ]&&echo "argment #2=$2"
then
echo "at least 2 argumnets passed to script."
else
echo "less than 2 arguments passed to script."
fi