Answers for "cut last field delimiter"

2

cut last field delimiter

Use rev command altogether with cut command as follows:
echo "1 2 3 4 5" | rev | cut -d ' ' -f '2-' | rev
#rev reverses string, then you cut from 2th field to end and reverse back
Posted by: Guest on November-10-2020

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language