bash - Base64 data in awk -


i have file , process awk tool.

awk -f "|" '{print $3 "|" $7 "|" $1 "|" $2}' animals.csv | grep cats >> data.txt 

how can make $3 encode base64 format?

thank you.

try doing :

awk -f "|" '     {         "echo "$3" | base64" | getline x         print x, $7, $1, $2     } ' ofs='|' animals.csv | grep cats >> data.txt 

the awk's getline read variable system command.


Comments

Popular posts from this blog

javascript - ScrollTo Effect (href to div) -

javascript - ng-class not responding to change in model in Angular? -

javascript - document.registerElement extending HTMLInputElement prototype while using custom tag name to avoid implicit browser style -