Mailinglist Archive: opensuse (4498 mails)

< Previous Next >
Re: [opensuse] awk/bash for password generation
  • From: Anders Johansson <ajohansson@xxxxxxxxxx>
  • Date: Tue, 21 Nov 2006 16:54:33 +0100
  • Message-id: <200611211654.33812.ajohansson@xxxxxxxxxx>
On Tuesday 21 November 2006 15:30, Kevin Donnelly wrote:
> 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:

Note that the numbering starts at 0, you said columns 9 and 10, so the indexes
should be 8 and 9 as I had them.

>
> 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.

You don't seem to read what I wrote. that "< filename" I had at the end wasn't
a typo, that is how it reads the file. Try it again, and this time don't
leave anything out
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups