batch-post Javacript files to dpaste (example) by pbx

New About Yours API Help
240 bytes, Bash
1
2
3
4
5
6
7
8
for f in $(ls *.js)
  do echo -n "$f - "
  curl -s -F "content=<$f" -F "syntax=js" -F "title=$f" http://dpaste.com/api/v2/
done

# Produces output like this:
#   a.js - http://dpaste.com/0EECJN1
#   b.js - http://dpaste.com/0HD98Y1
Pasted 12 months ago — Expires in 4 days
URL: http://dpaste.com/2VSARYG