thinkliberty Posted March 16, 2004 Report Share Posted March 16, 2004 ##!/bin/sh #getscox - Free to use and modify!! # Colors for output red='\E[31;40m' green='\E[32;40m' white='\E[37;40m' yellow='\E[33;40m' blue='\E[34;40m' lblue='\E[36;40m' bold="\033[1m" normal="\033[0m" links -source "http://finance.yahoo.com/d/quotes.csv?s=SCOX&f=sl1d1t1c1ohgv&e=.csv" > scox.csv ARRAY=(`sed s/[,\"]/\ /g < scox.csv`) COMPANY=${ARRAY[0]} SIGN=${ARRAY[4]:0:1} if [ "$SIGN" = "+" ]; then COLOR=$green else COLOR=$red fi echo -en $bold"Company:" $yellow$COMPANY$normal echo -en $bold " Date:" $yellow${ARRAY[2]}$normal echo -e $bold " Time: " $yellow${ARRAY[3]}$normal echo -en $bold"Current:" $yellow${ARRAY[1]}$normal echo -en $bold " Change: "$COLOR ${ARRAY[4]}$normal echo -e $bold " Volume: "$yellow ${ARRAY[8]}$normal echo -en $bold"Open:" $yellow${ARRAY[5]}$normal echo -en $bold " Day's High:" $blue${ARRAY[6]}$normal echo -e $bold " Day's low:" $lblue${ARRAY[7]}$bold echo tput sgr0 Quote Link to comment Share on other sites More sharing options...
thinkliberty Posted March 16, 2004 Author Report Share Posted March 16, 2004 (edited) script attached as file :deal: You need to have links installed to use it to install it open konsole and type su (it will ask for your root password) urpmi links exit Now make the script executable type chmod a+x getscox Then run the script type ./getscox or sh getscox getscox Edited March 16, 2004 by thinkliberty Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.