Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- FILE="parsed"
- COUNTRY="countrycodes"
- cat $FILE | while read -r x=`line`
- do
- cat $COUNTRY | cut -d':' -f 2 | while read -r y=`line`
- do
- while read -r y=`echo "$x" | awk -F: '$12 ~ /'"$y"'/ {print $12}'` # Just not sure if i can do like that
- do
- test -d /tmp/outputs || mkdir /tmp/outputs
- test -f /tmp/outputs/$y.txt || touch /tmp/outputs/$y.txt
- cat $x >> /tmp/outputs/$y.txt
- echo "$y.txt has grown to `wc -l src|cut -d' ' -f1` lines"
- done
- done
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement