I have a string with 3 fields separated by whitespace. I would like to concat the 2 last fields with
- making sure that the newline in the end is removed.
The following works:
echo -n "abc 1234 5679" | tr -s "" |cut -d ' ' -f2 -f3 | tr " " "-"
I was wondering if there is a
perl onliner for this?