close
寫SHELL要用報刪除空白的指令:
參考以下網頁:http://www.cyberciti.biz/tips/delete-leading-spaces-from-front-of-each-word.html
To remove all whitespace (including tabs) from left to first word, enter:
echo " This is a test" | sed -e 's/^[ \t]*//'
Output:
This is a test
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
en → zh-TW
空間
名詞: 空間, 場地, 間隙, 間距, 篇幅, 空地
全站熱搜
留言列表