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 -->
  #3 (permalink)  
Old 07-10-2008
hellomms hellomms is offline
Registered User
  
 

Join Date: Jul 2008
Posts: 2
Amazing!

Quote:
Originally Posted by frank_rizzo View Post
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
That is amazing, they both work!!

Thanks SOO Much!