way 1:
sed -e 's/[ \t]*$//' -i err_msg
way 2:
Find all of the htm file replace it.
find ./ -name '*.htm' -print | xargs sed -i 's/[ \t]*$//'
Where,
s/ : Substitute command ~ replacement for pattern (^[ \t]*) on each addressed line
^[ \t]* : Search pattern ( ^ - start of the line; [ \t]* match one or more blank spaces including tab)
// : Replace (delete) all matched pattern
sed tip: Remove / Delete All Leading Blank Spaces / Tabs ( whitespace ) From Each Line
0 意見:
張貼留言