ZhangZhihui's Blog  
2022-04-12 11:14PM
[/home/zzh/aaa]$>lh
total 8.0K
-rw-rw-r-- 1 zzh users    0 Apr 12 05:08 c.txt
-rw-rw-r-- 1 zzh users    0 Apr 12 05:08 b.txt
-rw-rw-r-- 1 zzh users    0 Apr 12 05:08 a.txt

2022-04-12 11:14PM
[/home/zzh/aaa]$>for x in *.txt; do
>> mv $x $x.bak
>> done

2022-04-12 11:16PM
[/home/zzh/aaa]$>lh
total 8.0K
-rw-rw-r-- 1 zzh users    0 Apr 12 05:08 c.txt.bak
-rw-rw-r-- 1 zzh users    0 Apr 12 05:08 b.txt.bak
-rw-rw-r-- 1 zzh users    0 Apr 12 05:08 a.txt.bak

 

zzh@ZZHPC:~/aaa$ for i in {1..5}; do echo $i; done
1
2
3
4
5

 

posted on 2022-04-13 11:20  ZhangZhihuiAAA  阅读(18)  评论(0编辑  收藏  举报