sed and grep save the day

I use thunderbird for one of my less recently used email accounts – I get a lot of spam.

I was trying to use a website to fill in a survey  but I forgot my password so they emailed it to this email account.

Of course the email goes straight into the spam folder.  This is rather large and I cannot browse it.

Easy solution: copy  the Junk file to my linux box.

Find the location in the file of the retailer:

grep -in retailer Junk

This lists the location in the file of the retailer.

The first entry was on line 920123 

sed -e”1,920000d” Junk > Junk.tail

I can now edit Junk.tail and find the temporary password.

Can you find a quicker solution?