Para os dados fornecidos em um arquivo chamado input
:
$ awk -F\; 'BEGIN {OFS=";"} { if( $3 == 1 ) { print $1,$2,"inactive" } else { print $1,$2,"active" } }' input
199240050;0180209199240050;active
199240241;0180209199240241;active
199240207;0180209199240207;active
199240400;0180209199240400;active
Como alternativa, com sed
:
$ sed 's/\;0$/active/;s/\;1$/inactive/' input
199240050;0180209199240050;active
199240241;0180209199240241;active
199240207;0180209199240207;active
199240400;0180209199240400;active