1.当前目录下有文件 1.txt 2.txt 3.txt
2.
#!/bin/sh for filelist in $(ls *.txt) do echo $filelist done
输出结果:
1.txt
2.txt
3.txt