networkguy
Technical User
I am trying to replace a particular field in a particular line. There are 2 choices: 1) line begins with name "eric"; 2) line number 2.
This is a script that replaces a field. How can I point it to the specific line???
#! /bin/ksh
read username?"Please enter your username:"
read password?"Please enter your password:"
nawk -v user=$username -v passwd=$password 'BEGIN {FS=";";OFS=";"} { $12=passwd;print }' input > output
Eric
This is a script that replaces a field. How can I point it to the specific line???
#! /bin/ksh
read username?"Please enter your username:"
read password?"Please enter your password:"
nawk -v user=$username -v passwd=$password 'BEGIN {FS=";";OFS=";"} { $12=passwd;print }' input > output
Eric