| http://www.w3.org/ns/prov#value | - Posted by mikshaw on Jan. 18 2007,13:18 If this is Bash, Your first attempt should have worked:lastChar=${myStr:(-1)}Another option is to add a space after the colon:lastChar=${myStr: -1}If you are using some other shell other than Bash, this probably will not work, and you may need to pipe your variable through cut or some other program.
|