当前位置:网站首页>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}' `
边栏推荐
- AITM2-0002 12s或60s垂直燃烧试验
- 使用WebAssembly在浏览器端操作Excel
- Viewrootimpl and windowmanagerservice notes
- Influence of oscilloscope probe on measurement bandwidth
- Sophomore personal development summary
- vant 源码解析之 utils/index.ts 工具函数
- Vant source code parsing event Detailed explanation of TS event processing global function addeventlistener
- Write an interface based on flask
- 当用户登录,经常会有实时的下拉框,例如,输入邮箱,将会@qq.com,@163.com,@sohu.com
- [daily training -- Tencent select 50] 89 Gray code (only after seeing the solution of the problem)
猜你喜欢
Reading and writing operations of easyexcel
LeetCode_ Hash table_ Difficulties_ 149. Maximum number of points on the line
Opérations de lecture et d'écriture pour easyexcel
事项研发工作流全面优化|Erda 2.2 版本如“七”而至
基於flask寫一個接口
EasyExcel的讀寫操作
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
Écrire une interface basée sur flask
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
Cross end solution to improve development efficiency rapidly
随机推荐
Influence of oscilloscope probe on measurement bandwidth
MySQL 千万数据量深分页优化, 拒绝线上故障!
判断横竖屏的最佳实现
PostGIS installation geographic information extension
123456
第05章_存储引擎
秋招将临 如何准备算法面试、回答算法面试题
五层网络协议
Interviewer: will concurrent programming practice meet? (detailed explanation of thread control operation)
启牛2980有没有用?开户安全吗、
R language [data management]
基于 Ingress Controller 在集群外访问 Zadig 自测环境(最佳实践)
股票开户选择哪家证券公司比较好哪家平台更安全
Determine the best implementation of horizontal and vertical screens
Simple getting started example of Web Service
校招期间 准备面试算法岗位 该怎么做?
Clion configures Visual Studio (MSVC) and JOM multi-core compilation
Is it necessary for bazel to learn
MYSQL IFNULL使用功能
Realize the function of verifying whether the user has completed login when browsing the page