On Tuesday 21 November 2006 14:07, Anders Johansson wrote:
It works, I actually tried it before I sent it. On a single command line, it would look like while IFS=';' read -a foo; do echo user ${foo[8]} has password ${foo[9]}; done < user_pw.csv When you tried it, did you make sure you typed everything correctly?
Yes, I cut and pasted (and also changed the column numbers to the correct ones). I get the following: kevin@baby:~/data/websites/paid/wps_aelodau_dynamic/assets/wps> while IFS=';' read -a foo; do echo user ${foo[9]} has password ${foo[10]}; done user has password user has password user has password user has password user has password That is, every time I press Return I get the "user has password" line. It's obviously not reading the contents of the file.
Don't bother with awk for simple things like this, as my example above shows, bash can do it all far simpler and easier.
OK. -- Pob hwyl / Best wishes Kevin Donnelly www.kyfieithu.co.uk - KDE yn Gymraeg www.eurfa.org.uk - Geiriadur rhydd i'r Gymraeg www.rhedadur.org.uk - Rhedeg berfau Cymraeg www.cymrux.org.uk - Linux Cymraeg ar un CD -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org