当前位置:网站首页>Problems encountered in office--
Problems encountered in office--
2022-07-05 21:18:00 【6666666666666er】
1.sed Special characters encountered
sed Pattern separator
up to now , We have only used one Separator , That's it The backslash (/
).
Suppose we need to use sed Enter... In the source /bin/sed
Replace with /home/yufei/bin/sed
because /
Is the pattern separator , We have to escape it , namely \/
.
echo "/bin/sed" | sed 's/\/bin\/sed/\/home\/yufei\/bin\/sed/'
A vertical bar |
A vertical bar (|
) Should be The backslash (/
) The most used delimiter outside .
Vertical lines can significantly improve sed Readability of pattern statements .
For example, the order above , We use a vertical bar as a separator , Can be rewritten as
echo "/bin/sed" | sed 's|/bin/sed|/home/yufei/bin/sed|'
2. The last line reads
tail -n 1 tt.txt
I will get One Blank line . In my case , I want to get bonjour.
use Awk:
awk '/./{ line=$0} END{print line}' tt.txt
3. Space split string
awk -F【 keyword 】 '{print $n}'
match_name=`echo "$match_Array" | awk -F ":" '{print $1}' `
边栏推荐
- Binary search
- Test of incombustibility of cement adhesives BS 476-4
- Why can't Chinese software companies produce products? Abandon the Internet after 00; Open source high-performance API gateway component of station B | weekly email exclusive to VIP members of Menon w
- Is it necessary for bazel to learn
- Hdu2377bus pass (build more complex diagram +spfa)
- 《SAS编程和数据挖掘商业案例》学习笔记# 19
- Chapter 05_ Storage engine
- MySQL 千万数据量深分页优化, 拒绝线上故障!
- int GetMonth( ) const throw( );后面的throw( )什么意思?
- Simple getting started example of Web Service
猜你喜欢
Who the final say whether the product is good or not? Sonar puts forward performance indicators for analysis to help you easily judge product performance and performance
XML modeling
R语言【数据管理】
ArcGIS\QGIS无插件加载(无偏移)MapBox高清影像图
EN 438-7 laminated sheet products for building covering decoration - CE certification
MySQL deep paging optimization with tens of millions of data, and online failure is rejected!
事项研发工作流全面优化|Erda 2.2 版本如“七”而至
uni-app 蓝牙通信
Talk about my fate with some programming languages
The transformation based on vertx web sstore redis to realize the distributed session of vertx HTTP application
随机推荐
Evolution of zhenai microservice underlying framework from open source component encapsulation to self-development
AITM2-0002 12s或60s垂直燃烧试验
selenium 获取dom内属性值的方法
[case] Application of positioning - Taobao rotation map
Comparison table of foreign lead American abbreviations
Monorepo management methodology and dependency security
ODPS 下一个map / reduce 准备
PVC plastic sheets BS 476-6 determination of flame propagation properties
100 cases of shell programming
Write an interface based on flask
Arcgis\qgis no plug-in loading (no offset) mapbox HD image map
Establishment of terminal security capability verification environment and penetration test records
EN 438-7 laminated sheet products for building covering decoration - CE certification
Enclosed please find. Net Maui's latest learning resources
显示器要申请BS 476-7 怎么送样?跟显示屏一样吗??
PVC 塑料片BS 476-6 火焰传播性能测定
启牛2980有没有用?开户安全吗、
浅聊我和一些编程语言的缘分
Mode - "Richter replacement principle"
Binary search