Index

It took me a long time to figure that one out:

    $ awk '/\.\./ { print "2. " $0; next }
           /\./ { print "1. " $0; next }
           { print }' <<EOF
    > foo
    > .foo
    > ..foo
    > EOF
    foo
    1. .foo
    2. ..foo

I didn’t know that command next which allows you to jump to the next line without executing the other rules.