鸿蒙 6.1 新特性-60fps流畅人物跳跃功能算法深度解析-鸿蒙PC端正弦值计算法
2026/6/15 19:07:57
ed命令用于文本编辑,其选项如下:
--p string:将ed的提示符设置为指定的字符串,默认字符串为空,即无提示符。
--s:抑制诊断信息,在脚本中使用很有用。
$ cat buzz #! /bin/ksh integer x=17 while : do x=17 done $ $ ed buzz # Use ed to edit the buzz file 47 # Character count is automatically displayed 2 # Command 2 means display line 2 integer x=17 s/17/23/ # Changes the 17 to a 23 2 # Redisplay line 2 integer x=23 3 # Display line 3 while : q ? # Editor displays a ? when confused q # Qui