Sample Header Ad - 728x90

how to use seq with xargs to curl request

1 vote
2 answers
4418 views
I'm working on curl commmand that performs an action based upon parms value curl 'http://www.example.com/actionid?id=123 ' id value i want to pump dynamically so seq 1 10 | xargs -I + curl 'http://example.com/actionid?id=123 ' In output I'm getting curl 'http://example.com/actionid?id=+ ' curl 'http://example.com/actionid?id=+ ' curl 'http://example.com/actionid?id=+ ' .... how can I pass it as value I also tried seq 1 10 | xargs -I + curl 'http://example.com/actionid?id=123 '`< <(printf '+\n' $(seq 1 10) I'm getting the same results. **solution** placed ' around -I '~' and its working now.
Asked by user316389 (29 rep)
Oct 13, 2020, 09:01 PM
Last activity: Nov 10, 2022, 04:31 PM