แก้ code นี้ ให้อยู่ในรูปที่ simple ที่สุด (command โดยไม่เรียก function)

wave
Thanomsak Chaiyameun
1,943
สังคมนักพัฒนาระบบ (Community)
แก้ code นี้ ให้อยู่ในรูปที่ simple ที่สุด (command โดยไม่เรียก function)

x() {                            

LIST=                            

SET_A=                           

for i in "$@"                    

do                               

        if [ "$i" = "admin=true" ]

        then                     

                SET_A="-a"       

                continue         

        fi                       

        LIST="$LIST \"$i\""    

done                           

eval mkuser $SET_A $LIST       

}                              

x id='3000' pgrp='CMB' exam

 

code นี้น่าจะเป็น code ที่ใว้สร้าง user ของ aix รบกวนผู้รู้ช่วยตอบด้วยนะครับ

0 ความคิดเห็น
ไม่พบผลลัพธ์