Advertisement
Guest User

show-trace

a guest
Oct 26th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. #!/bin/sh
  2. set -e
  3. newline=cat
  4. while [ $# -gt 0 ]; do
  5. case "$1" in
  6. --command)
  7. cat << EOF
  8.  
  9. begin command
  10. modes: oper
  11. styles: c i j
  12. cmdpath: show trace
  13. help: Show the contents of trace log files
  14. more: true
  15. end
  16.  
  17. begin param
  18. name: file
  19. presence: optional
  20. flag: file
  21. help: Display contents of trace log file
  22. end
  23.  
  24. begin param
  25. name: list
  26. presence: optional
  27. type: void
  28. flag: list
  29. help: List trace log files
  30. end
  31.  
  32. EOF
  33. exit
  34. ;;
  35. list)
  36. cd /home/cisco/ncs-run/logs/
  37. ls -1 *.trace
  38. exit
  39. ;;
  40. file)
  41. cd /home/cisco/ncs-run/logs/
  42. more $2
  43. exit
  44. ;;
  45. *)
  46. break
  47. ;;
  48. esac
  49. shift
  50. done
  51.  
  52. echo Specify a trace log file to display.
  53. echo Usege:
  54. echo show trace list ... lists trace log files
  55. echo show trace file \<file\> ... displays the selected log file
  56. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement