Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using tr in awk

user637544Nov 25 2009 — edited Nov 30 2009
Hi, I have a file and i want to encrypt the third and fourth fields.
cut -f3 -d'|' file | tr 'A-Z' 'a-z'
cut -f4 -d'|' file | tr '0-9' ' '

But i want the encrypted field with the complete file, not just the field.

awk -F'|' '{ OFS='|'; tr 'A-Z' 'a-z' <$3; tr '0-9' ' ' $4; print $0}' file
please help how can i achieve this
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 28 2009
Added on Nov 25 2009
6 comments
3,765 views