Sed - An Introduction and Tutorial by Bruce Barnett
|
Sed?comments are lines where the first non-white character is a "#." On many systems,?sed?can have only one comment,and it must be the first line of the script. On the Sun (1988 when I wrote this),you can have several comment lines anywhere in the script. Modern versions of Sed support this. If the first line contains exactly "#n" then this does the same thing as the "-n" option: turning off printing by default. This could not done with a?sed?interpreter script,because the first line must start with "#!/bin/sed -f" as I think "#!/bin/sed -nf" generated an error. It works as I write this update in 2008. Note that "#!/bin/sed -fn" does not work because sed thinks the filename of the script is "n". However, "#!/bin/sed -nf" does work. (编辑:网站开发网_马鞍山站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |

