Curl - input line by line from text file

view story

http://www.unix.com – Hi, I've got a text file with hundreds of lines I need to upload to an API via curl, one by one. The text file is like: Code: 2012-08-01 10:45,124 2012-08-02 10:45,132 2012-08-03 10:45,114 I want to get curl to go through the text file sending a post for each line. like: Code: curl --request POST http://website/api/post?apikey=$key\&time=$timestamp\&json={meter1:$data}" Any help appreciated! Moderator's Comments: Please use code tags next time for your code and d (HowTos)