Björn Tantau@swg-empire.de to Programmer Humor@programming.dev · 15 hours agoPretty straight forwardswg-empire.deimagemessage-square45fedilinkarrow-up1612arrow-down110file-text
arrow-up1602arrow-down1imagePretty straight forwardswg-empire.deBjörn Tantau@swg-empire.de to Programmer Humor@programming.dev · 15 hours agomessage-square45fedilinkfile-text
minus-squareScoopta@programming.devlinkfedilinkarrow-up95arrow-down1·14 hours ago…this is so much more cursed than it needs to be. If you want to bash in C just system("echo hello world");
minus-squaretempest@lemmy.calinkfedilinkarrow-up49·14 hours agoThat wouldn’t necessarily be bash though
minus-squaresmeg@feddit.uklinkfedilinkEnglisharrow-up47arrow-down1·13 hours agoFine, system("bash -c 'echo hello world'"); then!
minus-squareultrafastsloth@lemmy.worldlinkfedilinkarrow-up10·5 hours agoI decided to throw my PC in the composter and become a gardener
minus-squaresmeg@feddit.uklinkfedilinkEnglisharrow-up3·4 hours agoThat was actually the first line of C I’ve ever written so there’s no way I’m guessing the right number of escapes, but I guess I’d cheat by finding the value of each char and printing those one at a time.
minus-squareScoopta@programming.devlinkfedilinkarrow-up21·14 hours agoFair, should’ve just said shell
…this is so much more cursed than it needs to be. If you want to bash in C just
system("echo hello world");
That wouldn’t necessarily be bash though
Fine,
system("bash -c 'echo hello world'");
then!Now print “¯\_(ツ)_/¯” with the quotes
I decided to throw my PC in the composter and become a gardener
That was actually the first line of C I’ve ever written so there’s no way I’m guessing the right number of escapes, but I guess I’d cheat by finding the value of each char and printing those one at a time.
Fair, should’ve just said shell