title: How to split a string in shell and get the last field
body: <p>Suppose I have the string <code>1:2:3:4:5</code> and I want to get its last field (<code>5</code> in this case). How do I do that using Bash? I tried <code>cut</code>, but I don't know how to specify the last field with <code>-f</code>.</p>