shell 记录

1. &&、||
a && b || c
# 执行a,成功,执行b,否则,执行c
[root@hadoops01 ~]# ls abc && echo "success" || echo "faild"

ls: cannot access abc: No such file or directory
faild

你可能感兴趣的:(shell 记录)