Hello everyone i want to know to cut the last field with separator : without knowing how many fields that i have any ideas please . is there any option for command cut .
Asked
Active
Viewed 3.1k times
2 Answers
5
You can revert the string and then print 1st character. Itself cut can't work from backwards.
echo "Your string ABC" | rev | cut -c 1

Milan Dufek
- 184
- 7