psCodes.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/usr/bin/sh
  2. #\h = hostname
  3. #\u = user
  4. #\n = new line
  5. #\r = carriage return
  6. #\w = path
  7. #\W = directory
  8. #\t = time+secconds (24h)
  9. #\T = time+seconds (12h)
  10. #\@ = time+AM/PM (12h)
  11. #\A = time (24h)
  12. #\d = Date
  13. #\D{format} = prints date in format
  14. #\$? = error of last command
  15. #\j = jobs on this terminal
  16. #\l = shell's device base name
  17. #\s = shell's name
  18. #\v = bash version
  19. #\V = bash version + release
  20. #\! = command history number
  21. #\# = command number
  22. #\$ = # for root, $ for everyone else
  23. #\number = ascii octal character
  24. #\\ = \
  25. #\[ = open non-printed characters
  26. #\] = close non-printed characters
  27. #\e = excape
  28. RS="\[\033[0m\]" # reset
  29. BLD="\[\033[1m\]" # bold
  30. UL="\[\033[4m\]" # underline
  31. INV="\[\033[7m\]" # inverse background and foreground
  32. FBLK="\[\033[30m\]" # foreground black
  33. FRED="\[\033[31m\]" # foreground red
  34. FGRN="\[\033[32m\]" # foreground green
  35. FYEL="\[\033[33m\]" # foreground yellow
  36. FBLE="\[\033[34m\]" # foreground blue
  37. FMAG="\[\033[35m\]" # foreground magenta
  38. FCYN="\[\033[36m\]" # foreground cyan
  39. FWHT="\[\033[37m\]" # foreground white
  40. BBLK="\[\033[40m\]" # background black
  41. BRED="\[\033[41m\]" # background red
  42. BGRN="\[\033[42m\]" # background green
  43. BYEL="\[\033[43m\]" # background yellow
  44. BBLE="\[\033[44m\]" # background blue
  45. BMAG="\[\033[45m\]" # background magenta
  46. BCYN="\[\033[46m\]" # background cyan
  47. BWHT="\[\033[47m\]" # background white