I have a csv file which contains a large number of entries. I have to read certain lines from the file. The line number is stored in a variable called lineno.
How to accomplish this?It may look something like:
line=$(sed -n "($lineno)p")
I want to know the correct syntax to do this.
Thanks
You pretty much have it.
line=$(sed -n "${lineno}p" "$file")
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With