this post was submitted on 15 Dec 2025
358 points (98.6% liked)

linuxmemes

28487 readers
1408 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
     
    all 50 comments
    sorted by: hot top controversial new old
    [–] Atlas_@lemmy.world 55 points 3 days ago (3 children)

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

    :(){:|:};:

    [–] Molten_Moron@lemmings.world 40 points 3 days ago (3 children)

    What the fork does this even do?

    [–] NullGator@lemmy.ca 30 points 3 days 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 19 points 3 days ago (1 children)

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

    [–] EddoWagt@feddit.nl 9 points 3 days ago

    I didn't know!

    [–] bluesheep@sh.itjust.works 9 points 2 days ago

    It's results will blow you away!

    [–] Dadifer@lemmy.world 14 points 3 days ago

    Call it for a good time.

    [–] CubitOom@infosec.pub 15 points 3 days ago (1 children)
    [–] 9point6@lemmy.world 13 points 3 days ago* (last edited 3 days ago)

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

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

    [–] plyth@feddit.org 4 points 3 days ago* (last edited 3 days ago)
    [–] ultrahamster64@lemmy.world 62 points 3 days ago (2 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 8 points 3 days ago (3 children)

    The fuck is a glorp YouTuber?

    [–] FooBarrington@lemmy.world 48 points 3 days ago* (last edited 3 days 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).

    [–] funkless_eck@sh.itjust.works 18 points 3 days 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 7 points 3 days ago

    It is for when the processes get krangled.

    [–] chronicledmonocle@lemmy.world 4 points 3 days ago (1 children)

    I think I developed a brain bleed reading this

    [–] Rise1547@feddit.org 3 points 2 days ago

    scerg helps with that choom

    [–] luciferofastora@feddit.org 4 points 3 days ago

    I think they're making fun of not understanding the commands involved?

    [–] Rise1547@feddit.org 2 points 2 days ago* (last edited 2 days ago)

    glorp > fergle, cmv

    [–] Gonzako@lemmy.world 2 points 3 days ago

    Cat outputs your files text and grep searches though that output for occurrences of whatever you feed it. This thing of passing one commands output to another is called piping.

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

    [–] AeonFelis@lemmy.world 7 points 2 days ago
    • Write programs that do one thing and do it well.
    • Write programs to work together.
    • Write programs to handle text streams, because that is a universal interface.

    I guess none of these apply when reading files is involved?

    [–] 9point6@lemmy.world 23 points 3 days ago (1 children)

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

    Which is also exactly what said youtuber said in the same video (assuming this is about who I think it is!).

    They also made such reasonable statements as "I also pipe cat into grep when on the command line and playing around with my pipelines, but when it comes to writing full bash scripts to do useful work, think about using grep directly." (not an exact quote btw!)

    [–] radiouser@crazypeople.online 7 points 3 days ago (2 children)

    Looks like people didn't get the Sublime reference.

    Wowwwww... cant believe i missed it. Thanks

    [–] ranzispa@mander.xyz 1 points 2 days ago

    They all too high

    [–] exu@feditown.com 16 points 3 days ago (3 children)

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

    This is just big small trying to sell more less, obviously.

    [–] somerandomperson@lemmy.dbzer0.com 11 points 3 days ago (1 children)

    what about $EDITOR <(cat file)?

    [–] ulterno@programming.dev 6 points 3 days ago (2 children)

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

    [–] jayands@lemmy.world 2 points 3 days ago (1 children)

    The subtle difference is that your $SHELL is responsible for opening (and, iirc, parsing?) the file when you use \<, versus the $EDITOR being the responsible entity.

    [–] ulterno@programming.dev 1 points 2 days ago

    Oh I get it now.
    Also, for some reason setting vi as $EDITOR, it is not able to load the contents of the file, unlike vim that does.

    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

    [–] fartographer@lemmy.world 4 points 3 days 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.

    [–] dabaldeagul@feddit.nl 15 points 3 days ago* (last edited 3 days 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 :)

    [–] expr@programming.dev 19 points 3 days ago* (last edited 3 days ago) (1 children)

    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.

    [–] Ajen@sh.itjust.works 1 points 1 day ago* (last edited 1 day ago)

    And if you prefer the cat | grep ordering, < file.txt grep foo is also valid.

    [–] swicano@programming.dev 18 points 3 days ago (1 children)

    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

    [–] SaharaMaleikuhm@feddit.org 2 points 3 days ago

    That does sound reasonable. As I will never write such a script for others, I shall continue to cat into grep.

    [–] ArsonButCute@lemmy.dbzer0.com 18 points 3 days ago* (last edited 3 days ago) (2 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.

    [–] CallMeAl@piefed.zip 1 points 3 days ago

    cat sends its error via stderr so it won't go into the pipe (or grep). you will see the cat error on your terminal, unless you have redirected stderr to stdout

    [–] __hetz@sh.itjust.works 7 points 3 days 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.

    [–] chrash0@lemmy.world 2 points 3 days 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

    okay but if you run grep -r it will scan through all files in the current directory and all sub directories and tell you which file it found the string in. I haven't cat | greped in years.

    [–] Gray_Warden@mander.xyz 10 points 3 days ago

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

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

    [–] coriza@lemmy.world 3 points 3 days ago* (last edited 3 days 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 3 days ago

    just gotta tee