Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- # Second release supports commas in in the spell name
- #adjust for path where Spell.dbc has been converted to a csv file
- SPELLCSV=~/path_to/Spell.dbc.csv
- if [ $# -ne 1 ]
- then
- echo
- echo "Usage:"
- echo " `basename $0` <spell number>"
- echo
- exit
- fi
- SPELL=$1
- GREPLN=`grep -e "^$SPELL," "$SPELLCSV"`
- if [ "$GREPLN" ]
- then
- echo $GREPLN | awk -F"," 'BEGIN { FPAT = "([^,]+)|(\"[^\"]+\")" } { print "Spell #" $1 " = " $22 }'
- else
- echo "Spell #$SPELL not found."
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement