Last active
          August 29, 2015 14:03 
        
      - 
      
 - 
        
Save dkavraal/8058a11dc677a7e5e29a to your computer and use it in GitHub Desktop.  
    a few bash helper
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | alias cp='rsync -p --progress' | |
| # copy with progressbar | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | #!/bin/bash | |
| PWD=~/Downloads | |
| ls > /dev/null # if any case. avoid to kill self | |
| while true; do | |
| /usr/bin/aria2c -c -x14 -s14 http://... | |
| PID=$! | |
| echo $PID | |
| sleep 25 | |
| while [[ $( ps -ef | grep -e aria2c -e "##############" | grep -v "#####" | wc -l ) > 0 ]]; do | |
| echo "waiting aria to die..." | |
| kill $PID | |
| sleep 3 | |
| done | |
| done | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment