...this is so much more cursed than it needs to be. If you want to bash in C just system("echo hello world");
this post was submitted on 12 Mar 2025
5 points (100.0% liked)
Programmer Humor
21850 readers
1460 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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
That wouldn't necessarily be bash though
Fine, system("bash -c 'echo hello world'");
then!
Now print "¯\_(ツ)_/¯" with the quotes
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