Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Assigning * as value in a ksh array

$
0
0
I want to extract each and single character from a password string and put it in an array.

I tried this :
Code:

set -A password "echo $passwd | awk '{for (i=1; i<=length($1); i++) printf "%s ",substr($1,i,1)}'`
It's working as long that the password string doesn't contains any *

I tried a few thing but no luck. Anyone having an idea ?

Viewing all articles
Browse latest Browse all 16232

Trending Articles