Answers for "remove space and last character of a tstring"

1

remove last space from line

Use either one of both next commands with sed 's/to_replace/replace/':
sed 's/ *$//' file
sed 's/[[:blank:]]*$//' file
Posted by: Guest on October-22-2020
0

remove last charecter from string

buggy_name = 'GeekflareE'
name = buggy_name[:-1]
Posted by: Guest on October-21-2021

Code answers related to "remove space and last character of a tstring"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language