0

My bash script has a for loop that just does not seem to work and I can't seem to figure out what the issue is.

Here is the error I am getting:

((: j = : syntax error: operand expected (error token is " ")

For loop:

for ((j = $Frompointer; j > $Topointer-1; j--))
do
 echo "Print recovery points" | xargs >> Del.txt        
done

Not sure what's wrong with my for loop, any guidance is much appreciated!

1 Answer 1

1

It appears that $Frompointer is empty. j = $Frompointer is expanding to just j = which is a syntax error.

Sign up to request clarification or add additional context in comments.

1 Comment

In this case, the error message should say error token is "= " (at least in my bash).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.