2012年7月3日 星期二

[Sed] Remove space line in the file

[Sed] Remove space line in the file

sed '/^$/d;' -i test.htm



Find all of the htm file replace it.

find ./ -name '*.htm' -print | xargs sed -i '/^$/d;'




Remove / Delete All Leading Blank Spaces / Tabs ( whitespace ) From Each Line


Find all of the htm file replace it.

find ./ -name '*.htm' -print | xargs sed -i 's/[ \t]*$//'

Reference :

Related Posts:

0 意見:

張貼留言