Answers for "how to remove spaces at end of line linux"

1

remove space at end of each line file

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

how to remove spaces at end of line linux

//Use this
sed -e '/[[:space:]]\+$/s///' fileName.txt > FileName.temp 
//The temp file will allow you to check for spaces
Posted by: Guest on October-28-2021

Code answers related to "how to remove spaces at end of line linux"

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language