GrammarPolice@lemmy.world to memes@lemmy.world · 4 months agobumlemmy.worldimagemessage-square44fedilinkarrow-up1873arrow-down122
arrow-up1851arrow-down1imagebumlemmy.worldGrammarPolice@lemmy.world to memes@lemmy.world · 4 months agomessage-square44fedilink
minus-squaredeegeese@sopuli.xyzlinkfedilinkarrow-up34arrow-down2·edit-24 months agoAs a unix shell script: (cat ‘cat’) in (cat ‘cat’ ‘cat’) Which should evaluate to true, because ‘cat’ can be found in ‘catcat’.
minus-squareSpaceNoodle@lemmy.worldlinkfedilinkarrow-up13·4 months agobash: syntax error near unexpected token `in’
minus-squaredeegeese@sopuli.xyzlinkfedilinkarrow-up4arrow-down2·4 months agoA gold star for you! Now find a language where “cat cat in cat cat cat” is legal.
minus-squarePoolloverNathan@programming.devlinkfedilinkarrow-up7arrow-down1·4 months agocat cat in cat cat cat is legal Bash if cat and in exist, "cat cat" in "cat cat cat" is Python.
minus-squareSpaceNoodle@lemmy.worldlinkfedilinkarrow-up2arrow-down3·4 months agoMy point is that it’s not a shell script.
As a unix shell script:
(cat ‘cat’) in (cat ‘cat’ ‘cat’)
Which should evaluate to true, because ‘cat’ can be found in ‘catcat’.
bash: syntax error near unexpected token `in’
A gold star for you! Now find a language where “cat cat in cat cat cat” is legal.
cat cat in cat cat cat
is legal Bash ifcat
andin
exist,"cat cat" in "cat cat cat"
is Python.My point is that it’s not a shell script.
BOOOO!