minus-square@[email protected]linkfedilink32•edit-22 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-square@[email protected]linkfedilink2•2 months agoA gold star for you! Now find a language where “cat cat in cat cat cat” is legal.
minus-square@[email protected]linkfedilink6•2 months agocat cat in cat cat cat is legal Bash if cat and in exist, "cat cat" in "cat cat cat" is Python.
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!