Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

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
 
PREVIOUS NEXT
Tagged: #remove #space #line
ADD COMMENT
Topic
Name
9+7 =