this post was submitted on 12 Mar 2025
5 points (100.0% liked)

Programmer Humor

21809 readers
1842 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
[–] Scoopta@programming.dev 1 points 1 week ago (1 children)

...this is so much more cursed than it needs to be. If you want to bash in C just system("echo hello world");

[–] tempest@lemmy.ca 2 points 1 week ago (1 children)

That wouldn't necessarily be bash though

[–] smeg@feddit.uk 2 points 1 week ago (1 children)

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

[–] xthexder@l.sw0.com 1 points 1 week ago (1 children)

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

[–] Beanie@programming.dev 1 points 1 week 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