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 - How to synchronize the Three.js and HTML/SVG coordinate systems (especially w.r.t. the y-axis)? -

javascript - How do I find how many occurences are there of a highlighted string, and which occurence is it? -

java - Reading data from multiple zip files and combining them to one -