I have two simple Shell scripts that essentially do the same thing (i.e., printing all arguments), as are shown below.
S1:
#!/usr/bin/tcshecho [$argv[*]]
S2:
#!/usr/bin/bsd-cshecho [$argv[*]]
S1 runs OK on Ubuntu as a tcsh script:
% ./S1 a b[a b]
But S2 fails on Ubuntu as a bsd-csh script:
% ./S2 a becho: No match.
I know S2 can be fixed by a pair of double quotes around [$argv[*]]
, yet I'd like to know what leads to the different results in tcsh and bsd-csh. If possible, please provide links to documentation that help explain cause of the different results. Thanks in advance.