Skip to main content

Linux Bash remove last character from a string

str="Sample String"
echo "${str%?}"


will give a result: Sample Strin

Comments

Popular posts from this blog