4

Converting HP-UX awk to Solaris

view full story
linux-howto

http://www.unix.com – Hi, I am using awk in HP-UX to enter an encrypted entry of the password into /etc/passwd with success, this is the command I am using and it is working great. Code: cat /tmp/passwd.gal.before|awk -F: -v gal_passwd="encrypted_password" '{OFS=":" ; print $1,gal_passwd,$3,$4,$5,$6,$7}' > /tmp/passwd.gal.after entry before awk: Code: gal:!:235900:20:gal:/usr/local/gal:/bin/ksh entry after awk: Code: gal:Sz/lxxL5gA/MZo:235900:20:gal:/usr/local/gal:/bin/ksh However, For solaris I am not able to use the same command, i've seen that in Solaris the a (HowTos)