当前位置:网站首页>【实用脚本】获取某个文件的行号,然后删除文件内容。
【实用脚本】获取某个文件的行号,然后删除文件内容。
2022-06-11 17:42:00 【叹了口丶气】
获取某个文件的行号,然后删除文件内容。
#!/bin/bash
lines=`wc -l 27754.txt`
newlines=`echo $lines | awk '{print $1}'`
sed -i "1,${newlines}d" 27754.txt
边栏推荐
- 6-3 reading articles (*)
- Mathematical basis of information security Chapter 1 - Division
- Service学习笔记03- 前台服务实战
- 6-2 写文章(*)
- Dynamic: capturing network dynamics using dynamic graph representation learning
- 聚类方法汇总
- 光纤熔接知识汇总【转载自微信公众号弱电智能化工程2018】
- 6-3 读文章(*)
- Mathematical foundations of information security Chapter 3 - finite fields (II)
- 【先收藏,早晚用得到】100个Flink高频面试题系列(三)
猜你喜欢

Authing biweekly news: online application market (5.10-5.22)

Automated testing selenium

Ffmpeg parity field frame interlace progressive command and code processing

Service学习笔记01-启动方式与生命周期

Custom or subscription? What is the future development trend of China's SaaS industry?

Threejs uses indexeddb cache to load GLB model

你还不懂线程池的设计及原理吗?掰开揉碎了教你设计线程池

Chapter II relational database

Ffmpeg hard codec inter QSV

Port planning and APJ
随机推荐
Authoring share | understanding saml2 protocol
Tidb GC related problems
which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_ mod
6-6 batch sum (*)
Ffmpeg hardware codec NVIDIA GPU
Valid parentheses ---2022/02/23
Authing biweekly news: online application market (5.10-5.22)
spawn ./gradlew EACCES at Process.ChildProcess._handle.onexit
Service学习笔记01-启动方式与生命周期
sql server中关于FORCESCAN的使用以及注意项
Port planning and APJ
论文阅读 dyngraph2vec: Capturing Network Dynamics using Dynamic Graph Representation Learning
【题解】Codeforces Round #798 (Div. 2)
R语言寻找数据集缺失值位置
Bentley uses authing to quickly integrate application system and identity
mariadb spider分片引擎初体验
信息安全数学基础 Chapter 2——同余
删除链表的倒数第N个节点---2022/02/22
Chorus translation
信息安全数学基础 Chapter 4——二次剩余与方根