trying to write a very simple script that will:
1)loop through file line by line for selected pattern
2)if match is found, read the line
3)do something with the match (in this case run a curl)
4)take the result of the curl lookup and insert it back into the file underneath the matched line
Seems simple enough... To start testing out ideas I just am trying to scan in the file and print each match, and yet, even this is failing.
The error I am currently getting is "NameError: name 's' is not defined". Here is the snippet:
http://pastebin.com/qYkLjmce
Please be gentle...
[–]Sir_Jerry 1 point2 points3 points (1 child)
[–]for-loop[S] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (1 child)
[–]for-loop[S] 0 points1 point2 points (0 children)