Skip to content
Advertisement

How to select a specific range of rows from a text file with bash script [closed]

I want to choose a range of rows, every 9 rows start a new range. In the next example new range start every 8 positions: Line 2, 10 and 18 are the tittle, Line 3, 11 and 19 are the comment, Line 4, 12 and 19 are the path…

I need to parametrize this for after insert in a DB:

Example:

JavaScript

How do I select a specific range of rows from a text file with bash script?


Thanks @glenn jackman for your help. My objective is to have all variables for after insert in a DB oracle ordinated Schema. What is the best way in order to do this?

JavaScript

Advertisement

Answer

You could do this to get the nth range of lines:

JavaScript

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement