![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| scripting help with bash and awk | garethsays | Shell Programming and Scripting | 3 | 05-30-2009 10:18 AM |
| bash scripting help!! | eminjan | Shell Programming and Scripting | 3 | 05-18-2009 12:52 AM |
| Webmail access using shell scripting | iamgeethuj | UNIX for Advanced & Expert Users | 6 | 10-07-2008 08:26 AM |
| Should I do a bash scripting course?! | macpete | UNIX for Dummies Questions & Answers | 6 | 08-15-2008 02:17 AM |
| Bash Scripting | keyvan | Shell Programming and Scripting | 3 | 05-23-2007 01:04 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
scripting Bash to access ISP mail
I'm trying to create a small program to look at my isp and pull down the messages into individual text files. This is just a read only setup. I need to pull down the message and kill it on the server.
I'm stuck here. I have experimented with a for string but it always fails. I was trying to use date-time and the text file name and end with a .txt. I could read and delete them. Any suggestions #!/bin/bash # username="mlxxx@vabb.upn"; password="xyzpdq"; sleep 2 echo USER $username sleep 1 echo PASS $password sleep 2 echo STAT sleep 1 echo QUIT # # cmdline string to count messages #./getmail.sh | telnet mail.vabb.upn 110 | tail -n1 | cut -c5 ---------- Post updated at 05:25 PM ---------- Previous update was at 03:49 PM ---------- here is the older version of the same code. This has the for statement that doesn't work sleep 2 echo USER $username sleep 1 echo PASS $password sleep 2 echo STAT sleep 1 #echo RETR 1 # for i in $(seq 1 10); do echo "RETR $i">mail.txt | sleep 2 | mv mail.txt /home/otg1017/Mail/`date '+%Y%m%d-%T'`.txt ; done sleep 2 echo QUIT This is the command line used # $ ./getmail.sh | telnet mail.vabb.com 110 |
![]() |
| Bookmarks |
| Tags |
| bash, mail, pop3 |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|