You're replying to a comment by Peter Krumins.

February 21, 2009, 01:28

Hey Augusto. Now that I look at one-liner #8, it looks pretty ridiculous. But I didn't write it.

If I wrote it, here is how it would look:

awk '{ print ++a, $0 }'

At every line increment variable a, and output it together with the line itself.

The explanation of the original one liner is this:

Every line gets read in variable $0. The one-liner modifies this $0. It appends the contents of variable 'a' to the beginning of $0. But before appending 'a' it gets incremented by one by ++ unary operator.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter handle, if you have one.)

Type the word "floppy_92": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.