Advertisement
Guest User

cisco_get

a guest
Oct 28th, 2016
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.41 KB | None | 0 0
  1. #!/bin/bash
  2. commandfile="/opt/certix/scripts/aktive-komp/befehlslisten/befehle_cisco.txt"
  3.  
  4. max=$(cat $commandfile | wc -l)
  5. current=0
  6. pro=0
  7. cat $commandfile | while read command
  8. do
  9. current=$(( $current + 1 ))
  10. pro=$(( ($current*100) / $max ))
  11. echo $pro | dialog --gauge "$1 : $command" 5 300 0
  12. cisco_web $1 $2 $3 $command 2>/dev/null 1>> ${1}.txt
  13. done
  14. sed 's|</DL><HR><PRE>command completed.||g' -i ${1}.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement