fucking bash

i am not clever enough to figure out how to send a list of 150 files through diff to see whether or not the versions in two different directories are the same

either something decides to separate them by spaces before diff gets them, or diff gets them with surrounding quotes and doesn't unquote them

seriously, who came up with this utter bullshit?!

in the end i echo'd the diff commands i needed to run into a temporary file and sent that to sh as stdin

i have no idea why that behaved differently from doing the diffs directly, but it did, and it solved the problem

FUUUUUUUCK bash

@mewsleah `sh` invokes bash in "posix mode" instead of regular bash mode. It sounds like you were fighting bashisms, while your sh script bypassed them.

@arielmt no, unfortunately i was fighting bourne shell isms, and bash didn't offer anything to help. the script bypassed everything to do with replacement and just offered a big pile of diff -q calls, with two filenames in single quotes.

also, on my system (Void) sh is a symlink to dash

@arielmt (of course, some of the filenames had single quotes in them, which led to some unfortunate choking, but at least those were relatively obvious when i could see them in a file, rather than fighting the whole "when do quotes get expanded and when do they not" mechanism of bash

Follow

@mewsleah Ah, okay. Sorry for guessing wrong, and I'm still glad you prevailed. Also, it's good to know there are distros with non-bash 'sh' out there.

Sign in to participate in the conversation
Computer Fairies

Computer Fairies is a Mastodon instance that aims to be as queer, friendly and furry as possible. We welcome all kinds of computer fairies!