当前位置:网站首页>Sed replace value with variable
Sed replace value with variable
2022-06-29 08:22:00 【mixboot】
List of articles
sed
sed Replace value with variable
Preface
Replace value with variable
One 、sed
sed -i 's/old/new/g' file
Two 、 Replace value with variable
1. Replacement value
# echo "123" | sed 's/2/4/g'
143
2. Variable
# export num=55
# echo "123" | sed 's/2/'$num'/g'
1553
# hostname=`hostname`;echo '"Groups": null' | sed 's/null/["'$hostname'"]/g'
"Groups": ["tencent"]
Reference resources
边栏推荐
- Codeforces Round #799 (Div. 4)
- Want to open a stock account, is it safe to open a stock account online-
- [repair collection function, update login interface] knowledge payment applet, blog applet, full version open source code, resource realization applet, with 299 whole station resource data
- 笔记本电脑快速连接手机热点的方法
- NLP标注工具:Label Studio实现多用户协作打标
- 语音处理工具:sox
- Verilog初体验
- Should product managers learn from ink knife or Axure?
- Ceres optimization based on sophus
- 802.11--802.11n协议 PHY
猜你喜欢

关于组织2021-2022全国青少年电子信息 智能创新大赛西北赛区(陕西)复赛的通知
![[domain penetration authorization] cve-2020-1472 Netlogon privilege escalation vulnerability](/img/1a/916915b32e5adaf86b210fc764dbf6.png)
[domain penetration authorization] cve-2020-1472 Netlogon privilege escalation vulnerability

MySQL system keyword summary (official website)
![[Kerberos] analysis of Kerberos authentication](/img/c5/d429bcf3c26d9476531362ef286734.png)
[Kerberos] analysis of Kerberos authentication

Simulation time and bag operation in ROS

Ceres optimization based on sophus

Notice on organizing the second round of the Northwest Division (Shaanxi) of the 2021-2022 National Youth electronic information intelligent innovation competition

Debugging nocturnal simulator with ADB command

AI deep dive of Huawei cloud
![[eye of depth wuenda machine learning operation class phase IV] logic regression programming implementation](/img/48/0ed9b9b2adbce6ab3cf4a07674a9f4.png)
[eye of depth wuenda machine learning operation class phase IV] logic regression programming implementation
随机推荐
关于SQL语句的大小写
Automated test - uiautomator2 framework application - automatic clock in
Basic syntax - bit operation
About the many to many cascading insertion of sqlsugar (the ID of the collection attribute cannot be obtained, so the intermediate table cannot be maintained)
Voice annotation tool: Praat
Embedded product anti-theft version
[eye of depth wuenda machine learning homework class phase IV] summary of logistic regression
Hook 簡介
Mosaic notes
MySQL statistics by day / week / month / quarter / half year / year
服装产业发展趋势|供应链|智能制造
使用adb命令调试夜神模拟器
Stm32 usart+dma usage based on Hal Library
穿越过后,她说多元宇宙真的存在
Application of mediastreamer2 and GStreamer in embedded field
Simulation time and bag operation in ROS
Un voyage profond d'IA dans Huawei Cloud
Verilog first experience
征文投稿丨使用轻量应用服务器搭建博客环境
[eye of depth wuenda machine learning operation class phase IV] logic regression programming implementation