#!/bin/bash # BrWeather Modo INPE # Criado por LeandroNKZ # Se encontrar BUGs, ou erros no programa, favor reportar ao desenvolvedor # Acesse o site para maiores instruções: # http://brweatherproject.blogspot.com/ # Distribuído sob licença GPLv3 NUMID1=`grep -m1 '
15h00
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<'` NUMID2=`grep -m2 '
15h00
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<' | tail -n1` NUMID3=`grep -m3 '
15h00
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<' | tail -n1` NUMID4=`grep -m4 '
15h00
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<' | tail -n1` NUMID5=`grep -m5 '
15h00
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<' | tail -n1` NUMID6=`grep -m6 '
15h00
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<' | tail -n1` NUMID7=`grep -m7 '
15h00
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<' | tail -n1` NPC1=`grep -m1 '/imgs/pixel.gif" width="30px" height="10px" border="0"/>' ~/.brweather/cache/cache | cut -f2 -d'>' | cut -f1 -d'<' | sed 's/ //g' | tail -n1 | sed 's/%//g'` NPC2=`grep -m2 '/imgs/pixel.gif" width="30px" height="10px" border="0"/>' ~/.brweather/cache/cache | cut -f2 -d'>' | cut -f1 -d'<' | sed 's/ //g' | tail -n1 | sed 's/%//g'` NPC3=`grep -m3 '/imgs/pixel.gif" width="30px" height="10px" border="0"/>' ~/.brweather/cache/cache | cut -f2 -d'>' | cut -f1 -d'<' | sed 's/ //g' | tail -n1 | sed 's/%//g'` NPC4=`grep -m4 '/imgs/pixel.gif" width="30px" height="10px" border="0"/>' ~/.brweather/cache/cache | cut -f2 -d'>' | cut -f1 -d'<' | sed 's/ //g' | tail -n1 | sed 's/%//g'` NPC5=`grep -m5 '/imgs/pixel.gif" width="30px" height="10px" border="0"/>' ~/.brweather/cache/cache | cut -f2 -d'>' | cut -f1 -d'<' | sed 's/ //g' | tail -n1 | sed 's/%//g'` NPC6=`grep -m6 '/imgs/pixel.gif" width="30px" height="10px" border="0"/>' ~/.brweather/cache/cache | cut -f2 -d'>' | cut -f1 -d'<' | sed 's/ //g' | tail -n1 | sed 's/%//g'` NPC7=`grep -m7 '/imgs/pixel.gif" width="30px" height="10px" border="0"/>' ~/.brweather/cache/cache | cut -f2 -d'>' | cut -f1 -d'<' | sed 's/ //g' | tail -n1 | sed 's/%//g'` NLT1=`grep -A2 -m1 '
TEMP. MÍNIMA
' ~/.brweather/cache/cache | tail -n1 | sed 's/ //g ; s/º//g ; s/C//g'` NHT1=`grep -m1 '
TEMP. MÁXIMA
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'C' | sed 's/º//g'` if [ -f $NLT1 ] ; then LT1="ND" else LT1="$NLT1" fi NLT2=`grep -m2 '
TEMP. MÍNIMA
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'C' | sed 's/º//g' | tail -n1` NHT2=`grep -m2 '
TEMP. MÁXIMA
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'C' | sed 's/º//g' | tail -n1` NLT3=`grep -m3 '
TEMP. MÍNIMA
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'C' | sed 's/º//g' | tail -n1` NHT3=`grep -m3 '
TEMP. MÁXIMA
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'C' | sed 's/º//g' | tail -n1` NLT4=`grep -m4 '
TEMP. MÍNIMA
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'C' | sed 's/º//g' | tail -n1` NHT4=`grep -m4 '
TEMP. MÁXIMA
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'C' | sed 's/º//g' | tail -n1` NLT5=`grep -m5 '
TEMP. MÍNIMA
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'C' | sed 's/º//g' | tail -n1` NHT5=`grep -m5 '
TEMP. MÁXIMA
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'C' | sed 's/º//g' | tail -n1` NLT6=`grep -m6 '
TEMP. MÍNIMA
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'C' | sed 's/º//g' | tail -n1` NHT6=`grep -m6 '
TEMP. MÁXIMA
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'C' | sed 's/º//g' | tail -n1` NLT7=`grep -m7 '
TEMP. MÍNIMA
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'C' | sed 's/º//g' | tail -n1` NHT7=`grep -m7 '
TEMP. MÁXIMA
' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'C' | sed 's/º//g' | tail -n1` SOLN1=`grep -m1 '
NASCER DO SOL' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<'` SOLP1=`grep -m1 '
PÔR DO SOL' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<'` SOLN2=`grep -m2 '
NASCER DO SOL' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<' | tail -n1` SOLP2=`grep -m2 '
PÔR DO SOL' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<' | tail -n1` SOLN3=`grep -m3 '
NASCER DO SOL' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<' | tail -n1` SOLP3=`grep -m3 '
PÔR DO SOL' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<' | tail -n1` SOLN4=`grep -m4 '
NASCER DO SOL' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<' | tail -n1` SOLP4=`grep -m4 '
PÔR DO SOL' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<' | tail -n1` SOLN5=`grep -m5 '
NASCER DO SOL' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<' | tail -n1` SOLP5=`grep -m5 '
PÔR DO SOL' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<' | tail -n1` SOLN6=`grep -m6 '
NASCER DO SOL' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<' | tail -n1` SOLP6=`grep -m6 '
PÔR DO SOL' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<' | tail -n1` SOLN7=`grep -m7 '
NASCER DO SOL' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<' | tail -n1` SOLP7=`grep -m7 '
PÔR DO SOL' ~/.brweather/cache/cache | cut -f4 -d'>' | cut -f1 -d'<' | tail -n1` case $1 in "--option=LT1") echo $LT1 ;; "--option=HT1") echo $NHT1 ;; "--option=PC1") echo $NPC1 ;; "--option=umid1") echo $NUMID1 ;; "--option=SOLN1") echo $SOLN1 ;; "--option=SOLP1") echo $SOLP1 ;; "--option=LT2") echo $NLT2 ;; "--option=HT2") echo $NHT2 ;; "--option=PC2") echo $NPC2 ;; "--option=umid2") echo $NUMID2 ;; "--option=SOLN2") echo $SOLN2 ;; "--option=SOLP2") echo $SOLP2 ;; "--option=LT3") echo $NLT3 ;; "--option=HT3") echo $NHT3 ;; "--option=PC3") echo $NPC3 ;; "--option=umid3") echo $NUMID3 ;; "--option=SOLN3") echo $SOLN3 ;; "--option=SOLP3") echo $SOLP3 ;; "--option=LT4") echo $NLT4 ;; "--option=HT4") echo $NHT4 ;; "--option=PC4") echo $NPC4 ;; "--option=umid4") echo $NUMID4 ;; "--option=SOLN4") echo $SOLN4 ;; "--option=SOLP4") echo $SOLP4 ;; "--option=LT5") echo $NLT5 ;; "--option=HT5") echo $NHT5 ;; "--option=PC5") echo $NPC5 ;; "--option=umid5") echo $NUMID5 ;; "--option=SOLN5") echo $SOLN5 ;; "--option=SOLP5") echo $SOLP5 ;; "--option=LT6") echo $NLT6 ;; "--option=HT6") echo $NHT6 ;; "--option=PC6") echo $NPC6 ;; "--option=umid6") echo $NUMID6 ;; "--option=SOLN6") echo $SOLN6 ;; "--option=SOLP6") echo $SOLP6 ;; "--option=LT7") echo $NLT7 ;; "--option=HT7") echo $NHT7 ;; "--option=PC7") echo $NPC7 ;; "--option=umid7") echo $NUMID7 ;; "--option=SOLN7") echo $SOLN7 ;; "--option=SOLP7") echo $SOLP7 ;; "--option"* ) echo "Opção inválida. Experimente --help para mais informações." ;; esac exit 0