Linux下给文本添加行号
· 技术积累 · Linux

Linux给文本文件内容增加行号

方法1:cat命令

cat -n file.txt

方法2:nl命令

nl file.txt

方法3:awk命令

awk '{ print FNR " " $0}' file.txt

方法4:for循环命令

line=1
for i in `cat file.txt`
do
    echo "$line $i"
    let line+=1
done

Linux下给文本添加行号


本文最后更新时间 2024-03-30
文章链接地址:
https://me.jinchuang.org/archives/945.html
本站文章除注明[转载|引用],均为本站原创内容,转载前请注明出处
统计文本中每个字符出现的次数
Nali 离线ip数据库文件
苹果CMS v10内容管理系统搭建
bin/ld: Dwarf Error: found dwarf version '5', this reader only handles version 2, 3 and 4 information.

Linux命令行界面使用Python+Selenium+Chrome对网页截图

warnings.warn('Selenium support for PhantomJS has been deprecated, please use headless

留言列表

  1. Daizhuo
    iOS 14.0.1 Safari
    中国香港Amazon

    你好!想请教下,我在群晖DS218+上装了typecho,但主页只是很丑的字,没有排版的那种,感觉回到80年代。请问是否是css没加载?有什么解决办法吗?谢谢

    1. Awking
      Windows 10 Google Chrome
      中国上海市电信

      你说的这个,得看下你页面啥样子,才知道是css的问题还是字体的问题

我要留言