• shell sed 引用文件执行多个命令


    code

    macname@localhost Desktop % cat content 
    fox jumps over the lazy dog. 
    fox jumps over the lazy dog. 
    fox jumps over the lazy dog. 
    fox jumps over the lazy dog.
    macname@localhost Desktop % 
    macname@localhost Desktop % cat script1.sed 
    s/jumps/green/ 
    s/fox/elephant/ 
    s/dog/cat/
    macname@localhost Desktop % 
    macname@localhost Desktop % sed -f script1.sed content 
    elephant green over the lazy cat. 
    elephant green over the lazy cat. 
    elephant green over the lazy cat. 
    elephant green over the lazy cat.
    macname@localhost Desktop % cat content 
    fox jumps over the lazy dog. 
    fox jumps over the lazy dog. 
    fox jumps over the lazy dog. 
    fox jumps over the lazy dog.
    macname@localhost Desktop % 

  • 相关阅读:
    双指针
    二分查找
    二叉树
    递归思想
    排序算法
    Java常用集合使用方法总结
    攻防世界-PHP文件包含
    正则表达式随笔
    ts 函数
    ts 联合类型
  • 原文地址:https://www.cnblogs.com/sea-stream/p/14044960.html
Copyright © 2020-2023  润新知