I am working on a script and am having problems changing the delimeter that bash is using for arrays. Here is my sample/experiment script:
Code: Select all
#!/bin/bash
IFS='|'
array=(one two|three four)
echo ${array[0]}
echo ${array[1]}Code: Select all
./test: line 3: syntax error near unexpected token `|'
./test: line 3: `array=(one two|three four)'
thanks!
