zl程序教程

您现在的位置是:首页 >  系统

当前栏目

linux bash 函数

Linux 函数 Bash
2023-09-14 09:09:50 时间

1.筛选目录

#ls -lh |grep -v ^- |awk '{print $ 9}'

2. bash 函数

#!/bin/bash
function test1 {
    echo "test test"
}

a=1
while  [ $a -le 5 ]
do
    test1
    a=$[ $a + 1]
done
运行结果:
test test
test test
test test
test test
test test