@[email protected] to Microblog [email protected]English • 20 days agoA dog is not the opposite of a catlemmy.worldimagemessage-square122fedilinkarrow-up1683arrow-down127
arrow-up1656arrow-down1imageA dog is not the opposite of a catlemmy.world@[email protected] to Microblog [email protected]English • 20 days agomessage-square122fedilink
minus-square@rc__buggylinkEnglish22•edit-220 days 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-square@[email protected]linkfedilinkEnglish5•20 days agocat is for concatenating files, so the opposite would be something that breaks a stream up into multiple files.
minus-square@[email protected]linkfedilinkEnglish8•edit-220 days agoSo, split. Edit: although there’s also tac, which could fit the bill as well.
minus-square@[email protected]linkfedilinkEnglish3•20 days agoI mean… it’s nice that it exists and all, but I can’t really think of many useful usecases.
minus-square@rc__buggylinkEnglish2•20 days agoI think I only ever used it in an intro to shell scripting where we (almost) recreated the function of tail
minus-square@[email protected]linkfedilinkEnglish2•20 days agoSomething like tac | head | tac, I guess? Yes, that’s a valid use case indeed :)
minus-square@[email protected]linkfedilinkEnglish2•20 days 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-square@[email protected]linkfedilinkEnglish1•20 days agotac is a real command and does exactly what you think it is
minus-square@[email protected]linkfedilinkEnglish4•20 days agoHow about tac which prints lines but last to first.
minus-square@[email protected]linkfedilinkEnglish3•20 days agoIt prints to stdout. I’d say the opposite is read, which reads from stdin.
minus-square@[email protected]linkfedilinkEnglish2•20 days agoThere’s pushd where the opposite is clearly popd.
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.
So, split.
Edit: although there’s also tac, which could fit the bill as well.
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 :)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.
tac
is a real command and does exactly what you think it isHow about tac which prints lines but last to first.
It prints to stdout. I’d say the opposite is read, which reads from stdin.
Hmm, maybe pwd?
pwd Print Working Directory
There’s pushd where the opposite is clearly popd.