ahh

~$ which cat
you are viewing a single comment's thread
view the rest of the comments
[–] 12 points 6 days ago (1 child)
  • [–] 3 points 6 days ago (1 child)

    I've always wondered what a good use case for tac would be...

  • source
  • parent
  • hideshow 2 child comments
  • [–] 3 points 6 days ago (1 child)

    Reverse chronological order, mostly

    tac log.txt |head # would give you newest first

    no good for sort because sort already supports -r

    no need it for tail on large files because tail already skips to the end.

    I do a lot of impromptu bash to sus crap out of logs.

    when you're balls deep in

    cat log|grep -v foo| rev|cut -f 1-3 -d \ | |rev

    Sometimes tac comes in clutch.

  • source
  • parent
  • hideshow 2 child comments