在then块中使用多条命令

5年以前  |  阅读数:459 次  |  编程语言:Shell 
#!/bin/bash
#testing multiple commands in the then section
testuser=tiandi
if grep $testuser /etc/passwd
then
    echo The bash files from user $testuser are:
    ls -a /home/$testuser/.b*
fi

Copyright© 2013-2020

All Rights Reserved 京ICP备2023019179号-8