13

Is there any flag to od to make it not output line numbers in the result?

Ram Rachum
  • 1,795
  • 2
  • 15
  • 18
  • It doesn't output line numbers (at least, none of my versions does). It starts each line with a byte offset into the file for that line. Is this what you want to remove? – roaima Mar 27 '15 at 17:14
  • Just try `od | cut -b9-` to only output from byte 9 on. – choroba Mar 27 '15 at 17:27

1 Answers1

19

Assuming you mean the byte offset, from man od

   -A, --address-radix=RADIX
          output format for file offsets.  RADIX is  one  of  [doxn],  for
          Decimal, Octal, Hex or None

so for example od -An file

steeldriver
  • 78,509
  • 12
  • 109
  • 152
  • 3
    The leading space is kind of annoying, but works (had already upvoted you long ago). – Ciro Santilli OurBigBook.com Jan 21 '17 at 12:14
  • 1
    Came here to upvote @CiroSantilliTRUMPBANISBAD. Boy is that space annoying - you mean you're gonna make me add a `| tr -d ' '` just to make this useful? Don't they know programmers are lazy! – Brian Feb 09 '21 at 20:28