当前位置:网站首页>Pure shell implementation of text replacement
Pure shell implementation of text replacement
2022-07-31 05:58:00 【tcliuwenwen】
Blog Background
Do not rely on tr and do not rely on sed to achieve text replacement using pure shell
Detailed operation
Note: The test takes effect under bash version 5.1.16, but it doesn't seem to take effect under version 5.0
echo hello | while read -r str; do echo "${str//l/n}"; doneecho hello | (read -r str; echo "${str//l/n}")边栏推荐
- 为什么bash中的read要配合while才能读取/dev/stdin的内容
- 通信原理——纠错编码 | 汉明码(海明码)手算详解
- C语言 | 获取字符串里逗号间隔的内容
- 2021 Mianjing - Embrace Change
- sqlmap injection tutorial common commands
- 对于输出点是时间戳的渗透测试方法(以Oracle数据库为例)
- Access数据库的查询
- Detailed explanation of pointers in C language
- js中的this指向与原型对象
- 安装Multisim出现 No software will be installed or removed解决方法
猜你喜欢

局部变量成员变量、引用类型、this,static(第五天)

mysql password modification method in Linux (pro-test available)

js中的对象与函数的理解

Access数据库的查询

What is the difference between NFT and digital collection?

【Elastic-Job源码分析】——作业监听器

For penetration testing methods where the output point is a timestamp (take Oracle database as an example)

什么是 GameFi?

通信原理——纠错编码 | 汉明码(海明码)手算详解

Install mysqldb in mac10.14
随机推荐
Using IIS10 to build an asp website in win11
利用phpstudy搭建DVWA
Error: Cannot find module ‘D:\Application\nodejs\node_modules\npm\bin\npm-cli.js‘
5 methods of MySQL paging query
Powershell中UTF-8环境中文乱码解决办法
数字孪生将成为进入“元宇宙”一项重要的途径
通信原理——纠错编码 | 汉明码(海明码)手算详解
初识正则表达式
【云原生】原来2020.0.X版本开始的OpenFeign底层不再使用Ribbon了
mysql password modification method in Linux (pro-test available)
feign调用不通问题,JSON parse error Illegal character ((CTRL-CHAR, code 31)) only regular white space (r
MySQL错误-this is incompatible with sql_mode=only_full_group_by完美解决方案
quick-3.6源码修改纪录
podspec自动化升级脚本
永恒之蓝漏洞复现
MySQL压缩包方式安装,傻瓜式教学
powershell统计文件夹大小
纯shell实现文本替换
对js的数组的理解
小米手机短信定位服务激活失败