Linux bash初学 if语句

#!/bin/bash
if [ $# -eq 1 ] ; then
     if [ -f "$1" ] ; then
        while read username ; do
            user add -s /bin/false $username &>/dev/null
            done < $1
    else
        echo "Input file name not found"
        exit 1
    fi
else
    echo "please input a file name"
    exit 2
fi
原文地址:https://www.cnblogs.com/xiejh/p/10588313.html