Python scripts I use to manage my ssh connections, drive mounts, and other bash related things.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
845 B

  1. #!/bin/bash
  2. options
  3. #STATICthis script sources ansiConfig to set up color variables
  4. . ansiConfig.sh
  5. #--------------------------------------
  6. #set up colors
  7. defineANSI
  8. #use 'echo -e' or printf to parse escape sequences properly
  9. echo -e "${FYLLW}Print colored text with ANSi escape codes! ${RESET}"
  10. echo -e "${BWHITE}${FBLUE}You can define both foreground or background colors ${RESET}"
  11. echo -e "${BCYAN}${FBLACK}Some terminals ${BOLDON}support${BOLDOFF} ${INVON}special${INVOFF} ${ITALON}format${ITALOFF} ${BLINK}options${STATIC}.${RESET}\n\n"
  12. color="echo -e"
  13. $color "You can set up a shortcut for ${ITALON}'echo -e'${ITALOFF} or ${ITALON}'echo -en'${ITALOFF}"
  14. $color "${ITALON}\tcolor=\"echo -e\"${ITALOFF}"
  15. $color "${ITALON}\t\$color \"\${BOLDON}BOLDSTRING\${BOLDOFF}\"${ITALOFF}"
  16. echo -e "\n\nDont forget to ${RESET}RESET the colors\n"