Last active
December 21, 2015 16:59
-
-
Save asbestossupply/6337448 to your computer and use it in GitHub Desktop.
given the location of a coffeescript file this script will output the compiled js to the console with line numbers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[ $# -eq 0 ] && { echo "Usage: $0 filename"; exit 999; } | |
# check for coffee | |
C=`which coffee` | |
[ -z $C ] && { echo "coffee not found"; exit -1; } | |
# check for awk | |
A=`which awk` | |
[ -z $A ] && { echo "awk not found"; exit -1; } | |
# DO IT | |
$C -p $1 | $A '{print FNR "\t" $0}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment