【发布时间】:2013-10-12 04:36:34
【问题描述】:
我有 2 个文件,其中一个名为 Group.csv 包含
thisisgroupone
还有一个叫Users.csv
Testuser1,Testuser2,TestUser3
到目前为止这是我的脚本:
# this part of the script will now add the created users into the created group!
while IFS=, read col1 col2 col3
do
usermod -g $READ GROUP.CSV$ $col1
usermod -g $READ GROUP.CSV$ $col2
usermod -g $READ GROUP.CSV$ $col3
done < Users.csv
echo "Users now moved to new group sepcifyed in Group.csv"
- 我正在想办法同时读取这两个文件以完成此语句。
谢谢=D
【问题讨论】:
-
Group.csv 是否仅包含 1 个条目?