Gå til innhold

SCO på vei ned?


Anbefalte innlegg

Skrevet (endret)

Pastar ein liten fin sak eg kom over på ei mailingliste. Det lar deg følge med på SCO sin synkande aksjekurs :devil:

 

#!/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'
bold="\033[1m"
normal="\033[0m"

wget "http://finance.yahoo.com/d/quotes.csv?s=SCOX&f=sl1d1t1c1ohgv&e=.csv" -qO 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" '\E[33;40m'${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 -e $bold "High" $yellow${ARRAY[6]}$normal


#tput sgr0

#sample of scox.csv file
#"SCOX",9.80,"3/11/2004","12:46pm",+0.29,9.30,10.18,9.30,377634

Endret av jaskorpe
Videoannonse
Annonse

Opprett en konto eller logg inn for å kommentere

Du må være et medlem for å kunne skrive en kommentar

Opprett konto

Det er enkelt å melde seg inn for å starte en ny konto!

Start en konto

Logg inn

Har du allerede en konto? Logg inn her.

Logg inn nå
  • Hvem er aktive   0 medlemmer

    • Ingen innloggede medlemmer aktive
×
×
  • Opprett ny...