this post was submitted on 12 Mar 2025
692 points (98.5% liked)

Programmer Humor

25448 readers
880 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] tempest@lemmy.ca 57 points 4 months ago (6 children)

That wouldn't necessarily be bash though

[–] smeg@feddit.uk 58 points 4 months ago (4 children)

Fine, system("bash -c 'echo hello world'"); then!

[–] xthexder@l.sw0.com 10 points 4 months ago (3 children)

Now print "¯\_(ツ)_/¯" with the quotes

[–] Beanie@programming.dev 4 points 4 months ago

my best guess: system("bash -c 'echo \\\"¯\\\\_(ツ)_/¯\\\"'");

which will get parsed as: bash -c 'echo \"¯\\_(ツ)_/¯\"'

which will run: echo "¯\_(ツ)_/¯"

and since echo just prints whatever was given to it, it'll print "¯\_(ツ)_/¯" with the quotes

load more comments (2 replies)
load more comments (2 replies)
load more comments (3 replies)