|
for I in list1 list2 list3 \Bog'liq linux-operacion-tizimifor I in list1 list2 list3 \
list4 list5 list6
for tsiklida ro‘yxat sifatida fayl tizimining andozasini ko‘rsatish
mumkin. Bu holda har bir qadamda o‘zgaruvchiga andozani
qanoatlantiruvchi faylga yo‘l ko‘rsatiladi. Ushbu mexanizm
qo‘llanilgan misol:
1 #!/bin/bash
2 # for misol
3 # html faylni yaratish
4 #for FILES in ‘ls ~/.bash_*’
5 for FILES in ~/.bash_*
6 do
7 echo “” > $(FILES).html
8 echo “$(FILES)
” >>$(FILES).html
9 echo “
” >> $(FILES).html
10 cat $(FILES) >> $(FILES).html
|
| |