当前位置:网站首页>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}' `
边栏推荐
- poj 3414 Pots (bfs+线索)
- 示波器探头对测量带宽的影响
- 浅聊我和一些编程语言的缘分
- Wood board ISO 5660-1 heat release rate mapping test
- 事项研发工作流全面优化|Erda 2.2 版本如“七”而至
- Hdu2377bus pass (build more complex diagram +spfa)
- Clickhouse copy paste multi line SQL statement error
- Is Kai Niu 2980 useful? Is it safe to open an account
- Introduction of ArcGIS grid resampling method
- Haas506 2.0 development tutorial - Alibaba cloud OTA - PAC firmware upgrade (only supports versions above 2.2)
猜你喜欢

EN 438-7建筑覆盖物装饰用层压板材产品—CE认证

Arcgis\qgis no plug-in loading (no offset) mapbox HD image map

Write an interface based on flask

MySQL deep paging optimization with tens of millions of data, and online failure is rejected!
![[case] Application of positioning - Taobao rotation map](/img/2d/c834ce95a2c8e53a20e67fa2e99439.png)
[case] Application of positioning - Taobao rotation map

How to prepare for the algorithm interview and answer the algorithm interview questions

Influence of oscilloscope probe on measurement bandwidth

How to send samples when applying for BS 476-7 display? Is it the same as the display??

EasyExcel的读写操作

Deployment of Jenkins under win7
随机推荐
字典树简单入门题(居然是蓝题?)
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
MySQL ifnull usage function
Sequence alignment
ODPS 下一个map / reduce 准备
Pytorch实战——MNIST数据集手写数字识别
LeetCode: Distinct Subsequences [115]
Modifiers of attributes of TS public, private, protect
123456
Selenium finds the contents of B or P Tags
Arcgis\qgis no plug-in loading (no offset) mapbox HD image map
JS common method encapsulation
Enclosed please find. Net Maui's latest learning resources
Reading and writing operations of easyexcel
poj 3414 Pots (bfs+线索)
【日常训练】729. 我的日程安排表 I
Talk about my fate with some programming languages
Phpstudy Xiaopi's MySQL Click to start and quickly flash back. It has been solved
Careercup its 1.8 serial shift includes problems
What are the requirements of UL 2043 test for drive housing in the United States?