Permalink
Browse files

usda.gov: fix

  • Loading branch information...
l29ah committed Feb 10, 2014
1 parent 29a2f50 commit f798a77aaae99fdea99b7fcd092940e52c0d6673
Showing with 1 addition and 1 deletion.
  1. +1 −1 usda.gov/foodtable
View
@@ -1,4 +1,4 @@
#!/bin/sh
# Usage: $1 <food id>
# See http://ndb.nal.usda.gov/ndb/search/list
curl -s 'http://ndb.nal.usda.gov/ndb/foods/show/'"$1"'?format=Full' | sed -ne '/<td style="text-align:left;width:60px;" >/{N;N;N;N;N;N;N;N;N;N;N;N;N;s# *<[^>]*>\([^\n]*\)\n.*center;width: 30px;">\([^<]*\)</td>\n *<[^>]*>\([^<]*\)<.*#\1 \3\2#p}'
curl -s 'http://ndb.nal.usda.gov/ndb/foods/show/'"$1"'?format=Full' | sed -e '/<a href="#id-[^"]*"><sup>/{N;d}' | sed -ne '/<td style="text-align:left;width:60px;" >/{N;N;N;N;N;N;N;N;N;N;N;N;N;s# *<[^>]*>\([^\n]*\)\n.*center;width: 30px;">\([^<]*\)</td>\n *<[^>]*>\([^<]*\)<.*#\1 \3\2#p}'

0 comments on commit f798a77

Please sign in to comment.