添加30個用戶,用戶名形式stdxx,其中xx從01到30

#!/bin/bashshell

# 設計一個shell程序,添加一個新組爲class1,而後添加屬於這個組的30個用戶,bash

# 用戶名的形式爲stdxx,其中xx從01到30ide


for i in $(seq -w 01 30)設計

doit

   useradd -g class1 std$iclass

done程序



解釋說明:di

    seq -w 可讓序列的數字都是兩位數view

相關文章
相關標籤/搜索