Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash remove last character from string

country="portugal"
modified=${country::-3}

echo $modified

Output:
	"portu"
Source by reactgo.com #
 
PREVIOUS NEXT
Tagged: #bash #remove #character #string
ADD COMMENT
Topic
Name
5+9 =