Tag Archives: tail

Shell Script to Get Last Character of a String

shell script

There are a couple of ways to extract the last character of a string within a shell script. The easiest way is if you are working on bash shell – as bash will get the job done without the help of any external utilities.