output
/etc/profile ~/.bash_profile 实质是 shell 脚本
input
none
algo
sed '2i echo hi' ~/.bash_profile -i
sh ~/.bash_profile
显示 hi
本文介绍如何使用 sed 命令在 bash 配置文件 ~/.bash_profile 中插入一行用于输出 'hi',并且展示了如何使修改立即生效。
/etc/profile ~/.bash_profile 实质是 shell 脚本
none
sed '2i echo hi' ~/.bash_profile -i
sh ~/.bash_profile
显示 hi

被折叠的 条评论
为什么被折叠?