I managed to extract certain lines from a large text file separated by delimiters and write them to another file:
sed -n 100,200p file.tsv >> output.txt
However, I'm actually trying to grab the 8th value with tab delimiters from each line and write them in comma-separated files, but I cannot find the correct syntax for pattern matching, despite reading dozens of online articles.
For every time I tried to match
$2 at /([^\t]*\t){7}([0-9]*).*/
no luck.
The lines in the text file file.tsv resemble:
01 name1 title1 summary1 desc1 image1 url1 120019 time1
02 name2 title2 summary2 desc2 image2 url2 576689 time2
Please help me with this question?
Donna source
share