How do you write a mini script involving AWK to set a password that consists 7 characters [A-Za-z] generated randomly? The database output is to have the format:
UserIDassword:SSN
For example, I did the following script:
awk 'BEGIN {FS=","} {
{$1=substr($1, 1, 1);
$2=substr($2, 1, 1);
$3=substr($3, 1, 1);
$10=substr($10, 6, 10); }
{ if ( $2=="" ){ n="X" } else { n=$2 } ; }
{ print $1n$3$10 ; }
}' NightFlightSite.db #the file
I'm trying to figure out about the password part. Hope you can help me out on this. Thanks!
UserIDassword:SSN
For example, I did the following script:
awk 'BEGIN {FS=","} {
{$1=substr($1, 1, 1);
$2=substr($2, 1, 1);
$3=substr($3, 1, 1);
$10=substr($10, 6, 10); }
{ if ( $2=="" ){ n="X" } else { n=$2 } ; }
{ print $1n$3$10 ; }
}' NightFlightSite.db #the file
I'm trying to figure out about the password part. Hope you can help me out on this. Thanks!