Macã«å ¥ã£ã¦ããsedã¯BSDçsedã¨ããããã¤ã§ãLinuxãªã©ã«å ¥ã£ã¦ããGNUçsedã¨ã¯æ§ã ãªç¹ã§ä»æ§ãç°ãªãã¾ãã ä¸ã§ãå¼ã£ããããããã®ããã¡ã¤ã«ä¸æ¸ããªãã·ã§ã³ã®-iã«ã¤ãã¦ã§ããããã¾ãã¡ããã¨èª¬æããè¨äºãè¦å½ãããªãã®ã§ã¾ã¨ãã¦ããã¾ãã 以ä¸ã®ãããªã³ãã³ããå®è¡ããã¨ãBSD sedã§ã¯æå³éãã«å®è¡ããã¾ããã $ echo aaabbbcc > hoge.txt $ sed -i 's/aaa/zzz/' hoge.txt # BSD sed sed: 1: "hoge.txt": extra characters at the end of h command $ gsed -i 's/aaa/zzz/' hoge.txt # GNU sed $ cat hoge.txt zzzbbbcc
{{#tags}}- {{label}}
{{/tags}}