I have tried to remove all the white spaces but it's not taking it.
awk -F, -v OFS=", " 'NR==1 {
print $0,"FILENAME,DATE_LOADED,TEST";
next
}
{
line=$0
key=echo "${11//[[:space:]]/}" "${12//[[:space:]]/}" "${57//[[:space:]]/}"
key | getline
k=$0
cmd="md5 <<<"k
cmd | getline
md5sum=$0
print line, ENVIRON["FILE"], ENVIRON["ISODATE"], md5sum
}' $FILE > $NAME"_ready.csv"
If I try this it throws errors. I tried all options and really at a loss here.
key=echo $11$12$57 | tr -d
awk '{gsub(" +","");print $0}' test.text
If you want only awk based solution then this one liner will remove all the spaces from the file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With