Skip to content

Instantly share code, notes, and snippets.

@cboettig
Created September 1, 2010 20:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cboettig/561256 to your computer and use it in GitHub Desktop.
Save cboettig/561256 to your computer and use it in GitHub Desktop.
#!/bin/sh
# how to upload images to flickr and create a mediawiki embeddable text
flickr_uploader tag="$1" > ids.txt
# grep -o returns only the matches to the regular expression
# of any amount (*) of numbers to an endline
# sed find/replaces the number string with the <flickr> tag
# and the "&" pastes the regexp match back in
grep -o [0-9]*$ ids.txt | sed '/[0-9]*/<flickr>&|t<\/flickr>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment