我知道這個 sed 命令正在替換檔案中的一些特殊字符,但我不知道是什么字符。我不需要學習 sed - 我們正在擺脫 Unix。我需要知道要替換什么。
$d
1,$s/ *,/,/g (Is this replacing any number of spaces followed by a comma with just a comma?)
1,$s/ *$//g (This is the one I can't figure out. What does the dollar sign mean after the asterisk?)
1,$s/, */,/g' (Is this replacing a comma followed by any number of spaces with just a comma?)
我向您保證,谷歌搜索該代碼的任何部分都不會回傳任何有用的資訊。:)
uj5u.com熱心網友回復:
你得到了第一個和第三個,他們正在洗掉逗號前后的空格。
$是行尾字符,因此第二個字符從行尾洗掉尾隨空格。
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/461249.html
