The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 07-10-2008
frank_rizzo frank_rizzo is offline Forum Advisor  
Resident BOFH
  
 

Join Date: Dec 2007
Posts: 426
does this work?


Code:
awk -F: 'BEGIN{OFS=":"}{if(length($2) >2){$2="scrubbed"};print}' /etc/shadow

or

Code:
awk -F: '{if(length($2) >2){$2="scrubbed"};print $1,":",$2}' /etc/shadow