Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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
 
PREVIOUS NEXT
Tagged: #cut #field #delimiter
ADD COMMENT
Topic
Name
1+5 =