2

I have generated curl command from the for loop.

for ((i=1; i<=1000; i++)); do  
echo "curl http://example.com/page.php?page=$i"; done 

For now it prints desired curl command. Instead of just printing the curl command i want to execute the curl command. How do i make it work?

Thanks in advance.

1
  • 3
    Why not simply: curl "http://example.com/page.php?page=$i"? Commented Mar 3, 2018 at 15:08

1 Answer 1

7

I solved by simply removing the echo command as suggested by @PesaThe.

for ((i=1; i<=1000; i++)); do  
curl "http://example.com/page.php?page=$i"; done 

Thanks @PesaThe .

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

Comments

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.