#!/bin/bash

dir="$1"

if [ -z "$dir"=" " ];then
echo please input \$1
else
echo $dir
fi

如果$1为空,提示请输入$1,否则请输出。。。

bash a /var/www

目前这样不行,空的不提示。