I remember I done this thing long back..but with a trick...
1. First open your userlist.txt file and replace all SINGLE SPACE
with something like +
, you can do this in a single go by using vi editor %s command
2. Now you userlist.txt file looks like this.
3. In your shell script use the cut command with proper filter to cut the number of columns in what ever way you like.
4. Here you can use sed
to replace all +
with SINGLE BLANK SPACE
for lnam in `cat userlist | cut -c 7-`
lnam=`echo "$lnam" | sed 'y/+/ /'`
let "i += 1"
5. Now you can use variable fname
what ever way you like.
This is a thought, might be helpful...