l38.1a
来自「<B>Digital的Unix操作系统VAX 4.2源码</B>」· 1A 代码 · 共 30 行
1A
30 行
#printSometimes it is desirable to specify thatthe characters to be changed are at the beginningof the line. This uses the '^' character. For example, s/^ab/xy/pwill change "ab" to "xy" ONLY if "ab" begins the line.Remember that s/ab/xy/pwould just change the first "ab" anywhere in the line.In this directory there is a file "text"; whenever theletters "cat" begin a line, change them to "mouse; but leaveother instances of "cat" unaltered. Do this on each line (it onlytakes one command, as you know). Then rewrite the file andtype "ready".#create Refmouse's pawalley catmouse has nine liveslet the cat out of the bag#create textcat's pawalley catcat has nine liveslet the cat out of the bag#user#cmp Ref text#log#next39.1a 10
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?