Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- if [ $# -ne 1 ]
- then
- echo "usage $0 URL"
- exit 1
- fi
- url=$1
- curl $url > /tmp/unprocess.rpm.files
- ./word_proc < /tmp/unprocess.rpm.files > /tmp/refined.rpm.files
- total_rpms=`wc -l /tmp/refined.rpm.files | awk -F' ' '{print $1}'`
- remained_rpms=$total_rpms
- for i in `cat /tmp/refined.rpm.files`
- do
- echo "total $total_rpms remained $remained_rpms"
- curl -O ${url}/${i}
- remained_rpms=`echo $remained_rpms - 1 | bc`
- done
Advertisement
Add Comment
Please, Sign In to add comment