u0xpsec

uptime_conky.sh

Dec 1st, 2018
382
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/zsh
  2. #
  3. # Author: u0xpsec 2018
  4. #
  5. if [ `uptime -p | cut -d" " -f2- | wc -c` -eq 1 ];then
  6. echo "< just booted >"
  7. elif [ `uptime -p | cut -d" " -f2- | wc -c` -eq 9 ];then
  8. echo -n "< ";echo `uptime -p | cut -d" " -f2-`" > "
  9. elif [ `uptime -p | cut -d" " -f2- | wc -c` -eq 10 ];then
  10. echo -n "< ";echo `uptime -p | cut -d" " -f2-`" > "
  11. elif [ `uptime -p | cut -d" " -f2- | wc -c` -eq 11 ];then
  12. echo -n "< ";echo `uptime -p | cut -d" " -f2-`" > "
  13. elif [ `uptime -p | cut -d" " -f2- | wc -c` -eq 7 ];then
  14. echo -n "< ";echo `uptime -p | cut -d" " -f2-`" > "
  15. elif [ `uptime -p | cut -d" " -f2- | wc -c` -eq 8 ];then
  16. echo -n "< ";echo `uptime -p | cut -d" " -f2-`" > "
  17. elif [ `uptime -p | cut -d" " -f2- | wc -c` -eq 17 ];then
  18. echo -n "< ";echo `uptime -p | cut -d" " -f2-`" > "
  19. elif [ `uptime -p | cut -d" " -f2- | wc -c` -eq 18 ];then
  20. echo -n "< ";echo `uptime -p | cut -d" " -f2-`" > "
  21. elif [ `uptime -p | cut -d" " -f2- | wc -c` -eq 19 ];then
  22. echo -n "< ";echo `uptime -p | cut -d" " -f2-`" > "
  23. elif [ `uptime -p | cut -d" " -f2- | wc -c` -eq 20 ];then
  24. echo -n "< ";echo `uptime -p | cut -d" " -f2-`" >"
  25. elif [ `uptime -p | cut -d" " -f2- | wc -c` -eq 21 ];then
  26. echo -n "< ";echo `uptime -p | cut -d" " -f2-`">" #
  27. elif [ `uptime -p | cut -d" " -f2- | wc -c` -eq 27 ];then
  28. echo -n "< "`uptime | cut -d" " -f4-7` | sed 's\,\\2'; echo " > "
  29. elif [ `uptime -p | cut -d" " -f2- | wc -c` -eq 28 ];then
  30. echo -n "< "`uptime | cut -d" " -f4-7` | sed 's\,\\2'; echo " > "
  31. elif [ `uptime -p | cut -d" " -f2- | wc -c` -eq 29 ];then
  32. echo -n "< "`uptime | cut -d" " -f4-7` | sed 's\,\\2'; echo " > "
  33. else
  34. echo "Time Traveler!!!"
  35. fi
RAW Paste Data