merari42@lemmy.world to Microblog Memes@lemmy.worldEnglish · 4 months agoA dog is not the opposite of a catlemmy.worldexternal-linkmessage-square116fedilinkarrow-up11arrow-down10
arrow-up11arrow-down1external-linkA dog is not the opposite of a catlemmy.worldmerari42@lemmy.world to Microblog Memes@lemmy.worldEnglish · 4 months agomessage-square116fedilink
minus-squarerc__buggy@sh.itjust.workslinkfedilinkEnglisharrow-up0·edit-24 months agotee isn’t exactly the opposite of cat but I can’t remember a command that only redirects screen output to a file. What is up, tee? edit: what’s the opposite of “cd …”?
minus-squareSpaceNoodle@lemmy.worldlinkfedilinkEnglisharrow-up0·4 months agocat is for concatenating files, so the opposite would be something that breaks a stream up into multiple files.
minus-squaretetris11@lemmy.mllinkfedilinkEnglisharrow-up0·4 months agotac is a real command and does exactly what you think it is
minus-squarejoranvar@feddit.nllinkfedilinkEnglisharrow-up0·edit-24 months agoSo, split. Edit: although there’s also tac, which could fit the bill as well.
minus-squarejoranvar@feddit.nllinkfedilinkEnglisharrow-up0·4 months agoHeh, no, but they do have a nice set of man pages and other documentation online. I prefer NixOS. Easier keeping track of configuration, easier rolling back of (and experimentation with) new stuff.
minus-squarejoranvar@feddit.nllinkfedilinkEnglisharrow-up0·4 months agoI mean… it’s nice that it exists and all, but I can’t really think of many useful usecases.
minus-squarerc__buggy@sh.itjust.workslinkfedilinkEnglisharrow-up0·4 months agoI think I only ever used it in an intro to shell scripting where we (almost) recreated the function of tail
minus-squarejoranvar@feddit.nllinkfedilinkEnglisharrow-up0·4 months agoSomething like tac | head | tac, I guess? Yes, that’s a valid use case indeed :)
minus-squarezero_spelled_with_an_ecks@programming.devlinkfedilinkEnglisharrow-up0·4 months agoHow about tac which prints lines but last to first.
minus-squareTrigger2_2000@sh.itjust.workslinkfedilinkEnglisharrow-up0·4 months agopwd Print Working Directory
minus-squarejaybone@lemmy.worldlinkfedilinkEnglisharrow-up0·4 months agoThere’s pushd where the opposite is clearly popd.
minus-squarejaybone@lemmy.worldlinkfedilinkEnglisharrow-up0·4 months agoIt prints to stdout. I’d say the opposite is read, which reads from stdin.
tee isn’t exactly the opposite of cat but I can’t remember a command that only redirects screen output to a file.
What is up, tee?
edit: what’s the opposite of “cd …”?
cat is for concatenating files, so the opposite would be something that breaks a stream up into multiple files.
tac
is a real command and does exactly what you think it isSo, split.
Edit: although there’s also tac, which could fit the bill as well.
Oh, you use Arch?
Heh, no, but they do have a nice set of man pages and other documentation online. I prefer NixOS. Easier keeping track of configuration, easier rolling back of (and experimentation with) new stuff.
Hah, forgot about tac
I mean… it’s nice that it exists and all, but I can’t really think of many useful usecases.
I think I only ever used it in an intro to shell scripting where we (almost) recreated the function of tail
Something like
tac | head | tac
, I guess? Yes, that’s a valid use case indeed :)Hmm, maybe pwd?
How about tac which prints lines but last to first.
pwd Print Working Directory
There’s pushd where the opposite is clearly popd.
It prints to stdout. I’d say the opposite is read, which reads from stdin.