toSingleLine.sh 236 B

123456789101112
  1. #! /bin/sh
  2. ## script to convert javascript files to single line strings for use with C duktape
  3. file="$1"
  4. if [ "$file" == "" ]; then
  5. echo "Error: need file path"
  6. exit
  7. fi
  8. cat $file | tr -s '\t' ' ' | tr -d '\n'
  9. echo ""