Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Violinha

macrumors newbie
Original poster
Can someone help me?

I have this script working for sometime and today it just stop working and I can't figure why:

Code:
echo "\username@gmail.com"
echo "-----------------------------------------------------------------------"

#!/bin/sh

HOWMANY="5"
URL="https://"username":"password"@mail.google.com/mail/feed/atom/"


headarg="-$((2*HOWMANY))"

curl --silent "$URL" > ~/.gmail.txt

grep -E '(^<name>)|(^<title>)' ~/.gmail.txt | \
sed -n '2,$p' | \
sed -e 's/<name>Gmail - Inbox for //' |
sed -e 's/<name>//' |
sed -e 's/<\/name>//' |
sed -e 's/<title>Gmail - Inbox for //' |
sed -e 's/<title>//' |
sed -e 's/<\/title>//' |

head $headarg | sed G | sed 'n;d'

Thanx!
 
Last edited by a moderator:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.