cry-a-lot 457 B

123456789101112131415161718
  1. #!/bin/bash
  2. #
  3. # this script should run inside a Docker container.
  4. #
  5. # If you want to use this grammar directly on your system, just run:
  6. # polygen ./tap.grm
  7. PATH="${PATH}:/usr/games"
  8. TAP="$(polygen /tap.grm)"
  9. hashtag="$(echo "${TAP}" | cut -d '#' -f 2)"
  10. if [ -n "${hashtag}" ] ; then
  11. newhashtag="$(echo "${hashtag}" | sed "s@[ '\.-]*@@g" | tr '[[:upper:]]' '[[:lower:]]')"
  12. TAP="$(echo "${TAP}" | sed "s@#${hashtag}@#${newhashtag}@")"
  13. fi
  14. echo "${TAP}"