shell 中 [ 改为 [[

This commit is contained in:
whyour
2021-11-01 23:04:10 +08:00
parent 8d21401f88
commit 2ff3869608
6 changed files with 45 additions and 45 deletions
+1 -1
View File
@@ -27,7 +27,7 @@ remove_js_log() {
remove_empty_dir() {
cd $dir_log
for dir in $(ls); do
if [ -d $dir ] && [[ -z $(ls $dir) ]]; then
if [[ -d $dir ]] && [[ -z $(ls $dir) ]]; then
rm -rf $dir
fi
done