source: other-projects/is-sheet-music-encore/trunk/COMPX520-DOWNLOADER-MIDDLE-PNG.sh@ 33439

Last change on this file since 33439 was 33439, checked in by cpb16, 5 years ago

Have created properties file and accessibility from javaClassifierComparision. Have created download middle page only variant of image-downloader system. Have created EndToEndSystem bash script that will be used as makefile, with makefile being used to execute preset useful commands to the EndToEndSystem. It needs to be fleshed out as only has one script, this script can run a classifier and place the results into a subdirectory defined by the user

  • Property svn:executable set to *
File size: 559 bytes
Line 
1#!/bin/bash
2#https://stackoverflow.com/questions/15148796/get-string-after-character
3file_name=$1
4location=$2
5
6IFS=$'\n'
7for id in `cat $file_name` ; do
8 new_id=$(echo "$id" | awk 'BEGIN {FS="\t"}; {print $1}')
9 page_num=$(echo "$id" | awk 'BEGIN {FS="\t"}; {print $2}')
10 if [ $page_num != 1 ] ; then
11 let a=$page_num/2
12 middle_page_num=$a
13 else
14 middle_page_num=$page_num
15 fi
16 echo "num_pages: $page_num"
17 echo "id: $new_id MiddlePageNum: $middle_page_num"
18 echo ""
19 ./COMPX520-RUN-MIDDLE-PNG-hi-res.sh $new_id $middle_page_num $location
20 sleep 2
21done
Note: See TracBrowser for help on using the repository browser.