[K12OSN] Add users from file

cliebow at downeast.net cliebow at downeast.net
Wed Jun 9 14:01:51 UTC 2004


here is a little piece of script you can adapt


2004.csv the script reads
Brian,Austin,2004,Pa55word,baustin
Colin,Barry,2004,Pa55word,cbarry
Matthew,Becker,2004,Pa55word,mbecker
Nicole,Bickford,2004,Pa55word,nbickfor
################################################################



#################################################

cat 2004.csv | while read line; do
first=$(echo $line | cut -f1 -d ',')
last=$(echo $line | cut -f2 -d ',')
year=$(echo $line  | cut -f3 -d ',')
password=$(echo $line | cut -f4 -d ',')
name=$(echo $line | cut -f5 -d ',')
stustaff=$(echo $line | cut -f6 -d ',')
 #ADD Students OR Staff TO CSV

> Does someone know of a script which takes names from a file and automakes
u> sername?
> 
> I have a file with 300 names like so:
> 
> John,Smith
> 
> I want the script to go through the list and output another file like so:
> 
> John Smith,johsm (for example)... Alternatively an output which can be fed
> into the adduser batch in webmin.
> 
> Anybody seed something like this?
> 
> Regards
> Trond Mæhlum
> 



---------------------------------------------
This message was sent from Downeast.Net.
http://ellsworthme.com/






More information about the K12OSN mailing list