aidan@lemmy.world to Programmer Humor@lemmy.ml · 2 months agoI may not be the brightestlemmy.worldimagemessage-square11fedilinkarrow-up11arrow-down10
arrow-up11arrow-down1imageI may not be the brightestlemmy.worldaidan@lemmy.world to Programmer Humor@lemmy.ml · 2 months agomessage-square11fedilink
minus-squareaidan@lemmy.worldOPlinkfedilinkarrow-up0·2 months agodsygraphia, I meant to say escape the quotes(you can see that because the comment wasn’t about comments but was instead about quotes)
minus-squaredohpaz42@lemmy.worldlinkfedilinkEnglisharrow-up0·2 months agoIt’s all good. If you’re using bash and readline to read the file, you can use sudo echo ${INPUT@Q} (assuming your variable is named $INPUT) to have bash escape things like the quotes and other characters that could get you into trouble.
dsygraphia, I meant to say escape the quotes(you can see that because the comment wasn’t about comments but was instead about quotes)
It’s all good. If you’re using bash and readline to read the file, you can use
sudo echo ${INPUT@Q}
(assuming your variable is named $INPUT) to have bash escape things like the quotes and other characters that could get you into trouble.