• Scoopta
    link
    fedilink
    arrow-up
    104
    arrow-down
    1
    ·
    20 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");

      • smeg@feddit.uk
        link
        fedilink
        English
        arrow-up
        51
        arrow-down
        1
        ·
        19 hours ago

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

          • smeg@feddit.uk
            link
            fedilink
            English
            arrow-up
            3
            ·
            10 hours ago

            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.