shell脚本 读取 mnt/hgfs/share/ 该目录的文件并将文件名依次写入 filename.txt
#!/bin/bash
i=0;
count=0;
flag=0;
path=/mnt/hgfs/share/
cd ${path}
echo "LL"
for file in $(ls *)
do
echo $file >> filename.txt
let count+=1
echo $count
sleep 1s
done
#!/bin/bash
i=0;
count=0;
flag=0;
path=/mnt/hgfs/share/
cd ${path}
echo "LL"
for file in $(ls *)
do
echo $file >> filename.txt
let count+=1
echo $count
sleep 1s
done