Skip to content

Instantly share code, notes, and snippets.

@siwells
Created February 27, 2010 15:17
Show Gist options
  • Save siwells/316747 to your computer and use it in GitHub Desktop.
Save siwells/316747 to your computer and use it in GitHub Desktop.
wikify a list of papers for embedding into a wiki
#!/bin/bash
usage()
{
echo "usage: `basename $0` inputfile"
}
IN=$1
ENDING=".pdf"
OPEN="[["
CLOSE="]]"
if [ $# -ne 1 ]
then
usage
exit 1
fi
for paper in `cat papers.txt`
do
echo ' * '$OPEN${paper%$ENDING}$CLOSE >> wikipapers.txt
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment