Re: stuck on 1 shell variable, not re-updating.

2004-07-08 Thread Louie Miranda
thanks for your help thomas. As i could not get it to work with shell scripting i did try it on PHP. ## code ## for ($i = 1; $i <= 92; $i++) { $random_password = makeRandomPassword(); $sql = "update random set password = '$random_password' where id = $i"; $q = $db->query($sql); } ## code ## than

Re: stuck on 1 shell variable, not re-updating.

2004-07-08 Thread Thomas Adam
--- Louie Miranda <[EMAIL PROTECTED]> wrote: > #!/bin/bash > GEN=`pwgen --no-capitalize -N1` > for i in $GEN > do > echo "update dump set random= '$i'"|mysql -uroot insert > done > > -- > > I have created this shell script, it updates a specific table on a > mysql db. Now, the pwgen is a random p

stuck on 1 shell variable, not re-updating.

2004-07-07 Thread Louie Miranda
#!/bin/bash GEN=`pwgen --no-capitalize -N1` for i in $GEN do echo "update dump set random= '$i'"|mysql -uroot insert done -- I have created this shell script, it updates a specific table on a mysql db. Now, the pwgen is a random password generator. When i run this program, it only gets 1 variable