this post was submitted on 15 Dec 2025
242 points (98.4% liked)

linuxmemes

28444 readers
1658 users here now

Hint: :q!


Sister communities:


Community rules (click to expand)

1. Follow the site-wide rules

2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack users for any reason. This includes using blanket terms, like "every user of thing".
  • Don't get baited into back-and-forth insults. We are not animals.
  • Leave remarks of "peasantry" to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • 3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn, no politics, no trolling or ragebaiting.
  • Don't come looking for advice, this is not the right community.
  • 4. No recent reposts
  • Everybody uses Arch btw, can't quit Vim, <loves/tolerates/hates> systemd, and wants to interject for a moment. You can stop now.
  • 5. πŸ‡¬πŸ‡§ Language/язык/Sprache
  • This is primarily an English-speaking community. πŸ‡¬πŸ‡§πŸ‡¦πŸ‡ΊπŸ‡ΊπŸ‡Έ
  • Comments written in other languages are allowed.
  • The substance of a post should be comprehensible for people who only speak English.
  • Titles and post bodies written in other languages will be allowed, but only as long as the above rule is observed.
  • 6. (NEW!) Regarding public figuresWe all have our opinions, and certain public figures can be divisive. Keep in mind that this is a community for memes and light-hearted fun, not for airing grievances or leveling accusations.
  • Keep discussions polite and free of disparagement.
  • We are never in possession of all of the facts. Defamatory comments will not be tolerated.
  • Discussions that get too heated will be locked and offending comments removed.
  • Β 

    Please report posts and comments that break these rules!


    Important: never execute code or follow advice that you don't understand or can't verify, especially here. The word of the day is credibility. This is a meme community -- even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don't remove France.

    founded 2 years ago
    MODERATORS
    top 31 comments
    sorted by: hot top controversial new old

    You know what? I’m gonna cat into grep even harder now

    [–] Atlas_@lemmy.world 28 points 12 hours ago (2 children)

    You can actually change the functionality of some punctuation, such as is used in my favorite command

    :(){:|:};:

    [–] Molten_Moron@lemmings.world 16 points 12 hours ago (2 children)

    What the fork does this even do?

    [–] NullGator@lemmy.ca 9 points 10 hours ago (1 children)

    Create a function named : which runs :|: (calls itself and pipes the output to itself). Then it closes the function and uses a semicolon to end the function definition. Next run a command :.

    TLDR it's a bash fork bomb

    [–] Molten_Moron@lemmings.world 2 points 2 hours ago

    Oh I'm familiar, I was just being punny. Thanks for explaining for those that don't know, though!

    [–] Dadifer@lemmy.world 7 points 10 hours ago

    Call it for a good time.

    [–] CubitOom 8 points 12 hours ago (1 children)
    [–] 9point6@lemmy.world 5 points 9 hours ago* (last edited 9 hours ago)

    ..... That's awful, does it work?

    Edit: I guess it would need a semicolon or another pipe in the alias

    [–] ultrahamster64@lemmy.world 32 points 14 hours ago (1 children)

    I heard one popular glorp youtuber say "Only glorp hemptets ship into mleb" Bitch I ship into blep all I fucking want, it's more readable, and I piss whenever I fucking can. I piss two pisses before I piss two pisses, and then I piss more

    Yes I know putting two pisses in a row will break your bone. I've done it several times before by accident.

    implying I give a fuck

    [–] chronicledmonocle@lemmy.world 5 points 13 hours ago (1 children)

    The fuck is a glorp YouTuber?

    [–] FooBarrington@lemmy.world 26 points 13 hours ago* (last edited 11 hours ago) (3 children)

    Glorp is the spiritual successor to Fleeb, though mostly ran by the people behind Pumbu (the ones who started it, not the ones who ran it into the ground) and Muupi (the ones who ran it into the ground).

    I think I developed a brain bleed reading this

    [–] funkless_eck@sh.itjust.works 6 points 8 hours ago

    Glorp is on Poob. You can find it on Poob. You can go to Poob and get it. Log onto Poob right now. Go to Poob. Dive into Poob. You can Poob it. It's on Poob. Poob has it for you. Poob has it for you.

    [–] Trail@lemmy.world 5 points 8 hours ago

    It is for when the processes get krangled.

    Do you pipe two pipes in times of peace, and two in times of war?

    [–] 9point6@lemmy.world 13 points 14 hours ago

    Cat into grep lets you insert something between the file read and grep if you need to without having to reorder anything

    [–] Gray_Warden@mander.xyz 8 points 14 hours ago

    I understood a couple of those words. None of the technical ones, but some of them! They were expletives… But I understood them!

    [–] exu@feditown.com 12 points 15 hours ago (2 children)

    I prefer | less or less file.txt because I can search interactively

    [–] fartographer@lemmy.world 1 points 6 hours ago

    I prefer less until I find myself using less over and over again until I finally use cat so that I can just scroll up and review whatever I'm looking for.

    Is it the best or right way to do things? Nope, but it gets the job done just as good as anything else I do.

    And, it goes without saying, I do a terrible job of all of it.

    [–] somerandomperson@lemmy.dbzer0.com 8 points 15 hours ago (1 children)

    what about $EDITOR <(cat file)?

    [–] ulterno@programming.dev 5 points 12 hours ago (1 children)

    Well, when I can just do $EDITOR file...

    we're talking about a pipeline(-ish) thing here.
    so just out the cmd that you want to read the output of in the brackets

    [–] dabaldeagul@feddit.nl 10 points 15 hours ago* (last edited 9 hours ago) (5 children)

    Ok but what is supposed to be bad about grepping into cat? I don't get it

    Edit: thanks for the replies all, I didn't know you could add a file as an argument in grep. Makes sense now :)

    [–] __hetz@sh.itjust.works 4 points 8 hours ago

    It's less relatable now, and the technology was fucking stupid to begin with, but: Imagine printing out a document and feeding the sheets into a fax machine instead of just sending the file directly to the machine.

    Or using a cassette tape adapter to play music from your phone through a stereo system when that system has a built-in Aux port you could plug directly into ("Useless Use Of Cassette?").

    cat'ing into grep, and a handful of other programs people commonly pipe into from cat, is pointless when grep can be called directly against a file. cat is being run for no reason; a useless use of cat (uuoc). It means fuckall for most people today but I imagine it could've been an actual concern when hardware was much more limited and multiple users were connecting to a single system.

    [–] expr@programming.dev 16 points 14 hours ago* (last edited 14 hours ago)

    cat file.txt | grep foo is unnecessary and a bit less efficient, because you can do grep foo file.txt instead. More generally, using cat into a pipe is less efficient than redirecting the file into stdin with <, like grep foo < file.txt.

    [–] swicano@programming.dev 14 points 14 hours ago

    The video I saw was saying cat into grep is totally fine in day to day life do whatever comes out of your fingertips naturally, but if you're making a bash script for others to use, use grep args because cat pipe grep can do some strange stuff with error handling. Which I have no experience with, but sounds reasonable

    [–] ArsonButCute@lemmy.dbzer0.com 15 points 14 hours ago* (last edited 8 hours ago) (1 children)

    Grep can accept input from stdin as with a piped cat, but I it can also just call the file directly.

    In 99.999% ^obviously^ ^made^ ^up^ ^stat^ ^is^ ^obvious^ of situations its fine.

    The real issue is a piped cat into grep will fork the process. Why open two process threads when one would do the job?

    Edit: it was mentioned by @swicano@programming.dev but to expand a bit: piping cat into grep can also mask quite a few errors. It masks them because of how the shell handles error reporting on piped processes. IIRC, if the file is missing for example, you won't necessarily know that because while cat will throw a not-found error, that gets piped into grep who gladly accepts the error (which was piped to stdin) as its input and greps through the error, reporting back that your content wasn't found in the search material, not that the file was missing.

    [–] witty_username@feddit.nl 4 points 13 hours ago

    What the fork is this forking shirt?

    Soz I read your comment as if it were from the good place.

    [–] chrash0@lemmy.world 2 points 15 hours ago

    i think the alternative is to use grep args. but ya know i’m living in the future using nushell’s open command and ripgrep so the argument is just kinda adorable

    [–] coriza@lemmy.world 3 points 11 hours ago* (last edited 11 hours ago)

    How parsing (as in programming languages and commands) works is so interesting and is so hard for people to grasp and is really interesting to see how what you think is obvious is not for most people. I saw it all the time when teaching cs102. It is so hard to explain the difference that a blank space makes and why sometimes it is necessary and why sometimes it is not.

    That is all to say I find it really interesting and funny when OP says double pipe, because of course it looks like double pipe, you gonna tell me That || is something completely different than a single | ?

    [–] Skullgrid@lemmy.world 1 points 10 hours ago

    just gotta tee