Discussion
Loading...

Post

  • About
  • Code of conduct
  • Privacy
  • Users
  • Instances
  • About Bonfire
Patrick Johanneson 馃殌 馃嚚馃嚘
@pjohanneson@mstdn.ca  路  activity timestamp 6 hours ago

#TIL that cat has a twin, tac, which (like cat) prints out the content of a file but (unlike cat) reverses the order of the lines.

so, if you've got a text file foo that contains

a
b
c
d

then:

% cat foo
a
b
c
d

% tac foo
d
c
b
a

#Linux #Nerd

1
  • Copy link
  • Flag this post
  • Block
Andy
@AndyW@chaos.social replied  路  activity timestamp 2 hours ago

@pjohanneson There are many, many little helpers like this in GNU coreutils, see here: https://www.gnu.org/software/coreutils/manual/coreutils.html

For example, have you heard of "nl" or "fmt"?

GNU Coreutils 9.9

GNU Coreutils 9.9
  • Copy link
  • Flag this comment
  • Block
Log in

Kakapo Social

Kakapo Social: About 路 Code of conduct 路 Privacy 路 Users 路 Instances
Bonfire social 路 1.0.0 no JS en
Automatic federation enabled
  • Explore
  • About
  • Members
  • Code of Conduct
Home
Login