Head scratcher - bash script returns error only once
1 Attachment(s)
This snippet
Code:
echo -e "What text file will I be using?" Code:
What text file will I be using? Carver (Whole script is attached) |
Your 'if' has no test included, ie the word 'test' or [[]] seem to be missing, hence the 'if' is testing the output of the command returned by $item.
As per your previous posts, the reason for the 'if' and the setting of IFS still make no sense to me, because I have still never seen a file that uses a backspaced newline as its delimiter. |
I think the error is being generated by the following test, not the read itself.
Use set -xv at the top of your script to see what it is trying to do with your input. -- @grail faster than I, as usual! |
Code:
if "$item" =~ ; then such kind of errors can be found automatically on the page I already suggested: http://www.linuxquestions.org/questi...7/#post5665533. You do not need to wait any response, it will tell you the result immediately. Also set -xv already mentioned several times, using it will speed up finding these issues too. |
You clinched it.
Thanks
Quote:
|
Please mark as SOLVED once you have a solution.
|
All times are GMT -5. The time now is 06:27 PM. |