• 1 !/bin/bash 2 for misol 3 html faylni yaratish 4 for FILES in ‘ls /.bash_*’ 5 for FILES in /.bash_* 6 do
  • 10 cat $(FILES) >> $(FILES).html 19 11 echo “ test
  • for I in list1 list2 list3 \




    Download 3,94 Mb.
    Pdf ko'rish
    bet15/15
    Sana24.11.2023
    Hajmi3,94 Mb.
    #104538
    1   ...   7   8   9   10   11   12   13   14   15
    Bog'liq
    linux-operacion-tizimi

    for 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 


    19 
    11 echo “
    test 

    Download 3,94 Mb.
    1   ...   7   8   9   10   11   12   13   14   15




    Download 3,94 Mb.
    Pdf ko'rish