For Example I have a file like as follows .
A,Y29tLz9hPTQ2JmM9NDQzNzgmczE9Q0,123
B,FJNLTA2MjQyMDE3LVAmczI9ODQ3MDA,321
I want to print field1,field2(by base 64 decoding),field3
Output Required ::
A,result of base 64 decode,123
B,result of base 64 decode,321
give this awk one-liner a try:
Test with your example:
You can do this in a bash script with a few
read
commands andbase64 -D
:Your one base64 strings has binary data in it though, so output may look funky due to control characters.