grantdavey91
Forum Supporter

However, back to the actual scripts.
toppicks1.sh:
should really be:Code:workdir=/usr/script/scrapes if [ ! -d "$workdir" ]; then mkdir /usr/script/scrapes fi
Code:workdir=/usr/script/scrapes if [ ! -d "$workdir" ]; then mkdir "$workdir" fi
toppicks2.sh:
This uses let, which is a bash-only construct, so line one should be #!/bin/sh (in base that isn't a symlink to bash, which it isn't on Vix by default).
should beCode:if [ $pick == 1 ]; then
since you are expecting it to be a number, not text.Code:if [ $pick -eq 1 ]; then
is better done as:Code:if [ $pick == 1 ]; then . elif [ $pick == 2 ]; then . elif [ $pick == 3 ]; then . else
Code:case $pick in 1) .;; 2) .;; 3) .;; *) .;; esac
both:
should be:Code:cd /usr/script/scrapes
orCode:cd /usr/script/scrapes || exit
since you shouldn't continue on an error.Code:if ! cd /usr/script/scrapes; then echo >&2 "Failed to reach /usr/script/scrapes" fi
thanks birdman; would you mind editing the relevant lines and re-upload the scripts as a zip so i can then put on the box and unzip them to /us/script as i did before; i think the main issue is that i am using a mac but with your help on the last script it seemed to work without me needing to open the files
i think its time for me to consider going back to windows
thanks