Created
November 3, 2013 03:30
-
-
Save austinogilvie/7286342 to your computer and use it in GitHub Desktop.
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 | |
| COUNTER=1 | |
| for line in $(cat list_of_extreme_sports.txt); do | |
| url=$(echo "$line" | cut -d'|' -s -f2) # split on pipe sep and take 2nd col | |
| if [ ! -z "$url" -a "$url" != " " ]; then # ensure not empty string. | |
| if [[ "$url" == http* ]]; then # check that it starts with http | |
| OUTFILE="outfile_${COUNTER}" | |
| ~/Workspace/Repositories/opensource/table2csv/table2csv/table2csv $url --save $OUTFILE | |
| COUNTER=$((COUNTER + 1)) # bump the counter += 1 | |
| fi | |
| fi | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment