1

Quero fazer script com Shell script que extraia de um arquivo de texto emoticons, por exemplo ;), :), :3, :(, xD e que também conte os emoticons de cada sentença

Uma sentença é declarada positiva se a soma dos emoticons positivos exceder 2,5 vezes a soma dos emoticons negativos se presentes, se não a sentença é declarada negativa, eu fiz esse código que conta a quantidade de positivo, mas estou meio confuso, por favor alguém poderia me ajudar a terminar esse script?

file="${1}"

while loop

while IFS= read -r line
x=0
do
    let "x=x+1"

    qtd=$(echo "$line" | sed -r 's/ /\n/g' | grep "POSITIVO" | wc -l)
    echo "SENTENÇA $x \t - POSITIVO - $qtd"
done <"$file"

Exemplos de Sentenças(Comentários_do_Twitter.txt):

?RT @justinbiebcr: The bigger the better....if you know what I mean ;)
Listening to the "New Age" station on @SlackerRadio 
I favorited a YouTube video -- Drake and Josh - The Storm "We will rock you" 
i didnt mean knee high I ment in lengt it goes down to my knees ^-^ and is so cute I love it!
I wana see the vid Kyan
if my mom went on for the love of ray J or any reality show i'd bee pissed .
Ok so I just got a deal for my own show "For The Love Of Deez Nuts" go to VH1/deezNuts to apply ....R u here for Deez Nuts???
@Mrhilton1985 Welcome to Twitter xx
@kjbmusic oh yeah... however, I'd still like to be in the midst of it all though... u know...
Can't say I like the new facebook layout. But just posted pics from my Super Bowl week. =)
I need a nice tea-drinking pic for our #Tea Club Membership page - anyone got one they'd be happy for me to use? 
@JonathanRKnight so twitpic it lol, I love Home Depot, love working w/my hands and building things, my dad was in construction
@BarCough it's enough to make you sick, eh? there's nothing sacred anymore
0

0

Pesquise outras perguntas com a tag .