This is what I normally use to add numbers to the beginning of each line:
awk '{ print FNR " " $0 }' file
However, what I need to do is start the number at 1000001
. Is there a way to start with a specific number like this instead of having to use line numbers?
You can just add 1000001
to FNR
(or NR
):
awk '{ print (1000001 + FNR), $0 }' file
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments