------------------------------------------------------------------------ PROBLEM: You wish to number a file but skipping headers etc. (Why number lines? Useful when you wish to do a complicated merge+sort). ------------------------------------------------------------------------ $ cat Rabbits %Rabbit_Name Rabbit_Index Parvi 10 Laxmi 5 Tubby 8 Padma 6 Rusty 6 cntrl D $ nl -b p"^[^%]" Rabbits %Rabbit_Name Rabbit_Index 1 Parvi 10 2 Laxmi 5 3 Tubby 8 4 Padma 6 5 Rusty 6 #Note that what follows after "p" is a regular expression (whence it #is quoted). Note the regular expression. (While at it, the #expression "[^]" is not only not what you think(!) but also makes #no sense. [Worth pondering].