bash - Another approach to apply RIPEMD in CSV file -


i looking approach apply ripemd-160 second column of csv file.

here code

awk -f "," -v env_var="$key" '{     tmp="echo -n \047" $2 env_var "\047 | openssl ripemd160 | cut -f2 -d\047 \047"     if ( (tmp | getline cksum) > 0 ) {         $3 = toupper(cksum)     }     close(tmp)     print }' /test/source.csv > /ziel.csv 

i run in big csv file (1go), takes 2 days , 100mo, means need wait month new csv.

can me idea , approach data faster.

thanks in advance

you can use gnu parallel increase speed of output executing awk command in parallel explanation check here

cat /test/source.csv | parallel --pipe awk -f "," -v env_var="$key" '{     tmp="echo -n \047" $2 env_var "\047 | openssl ripemd160 | cut -f2 -d\047 \047"     if ( (tmp | getline cksum) > 0 ) {         $3 = toupper(cksum)     }     close(tmp)     print }' > /ziel.csv 

Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -