Search Results

Search: Posts Made By: FemoTheDon
2,335
Posted By MadeInGermany
Without an external command (paste) while read...
Without an external command (paste)
while read i <&3 && read j <&4
do
useradd "$i"
echo "$j" | passwd --stdin "$i"
done 3<file1 4<file2
2,335
Posted By Scott
There are a number of ways to accomplish that....
There are a number of ways to accomplish that. Assuming there is a direct one-to-one mapping between the two input files, then you could do something like:

paste file[12] | while read user pass x;...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 09:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy