Using awk to pull specific lines from a file

前端 未结 6 2057
醉话见心
醉话见心 2020-12-03 15:36

I have two files, one file is my data, and the other file is a list of line numbers that I want to extract from my data file. Can I use awk to read in my lines file, and the

6条回答
  •  心在旅途
    2020-12-03 16:07

    while read line;do echo $(sed -n '$(echo $line)p' Datafile.txt); done < numbersfile.txt

提交回复
热议问题