awk remove last character
use awk length and substr functions
➜ ~ echo "asdfsdfsf" | awk '{t=length($0)}END{print substr($0,0,t-1)}'
use awk length and substr functions
➜ ~ echo "asdfsdfsf" | awk '{t=length($0)}END{print substr($0,0,t-1)}'