I'm trying to run a simple shell script example:
STR="qwe;ert;rty;tii"
IFS=';' read -r NAMES <<< "$STR"
This is giving me the following error message:
syntax error: got <&, expecting Word
I'm not exactly sure why this isn't working. I thought the syntax I used was correct and I tried comparing to other examples and I saw the syntax was almost identical.
Any feedback would help
Thanks
<&is your code. Please make sure that your snippet actually reproduces your problem before asking a question.echo "$BASH_VERSION"emit? If you save this script to a file, and runbash -x YourFileNameHere, what gets emitted?PATHas a name for one of their own variables and then wonder why nothing else works; usingpath(str,names, etc) instead avoids collisions.9.4.1isn't a version of bash that exists -- the most recent release series is 4.3.x as of this writing. Presumably you're using something which isn't, well, actually bash.