Click to See Complete Forum and Search --> : Help with shell scripts


theclave
04-19-2001, 12:57 PM
Can anyone help me with writing scripts to do the following?:

1. I regularly telnet into a UNIX system, and read my mail by cd'ing to my inbox and doing cat <filename> for each message. What I want is a script that will display just the text starting 'From:' to avoid all the various crap that comes first.

2. I'm setting up a home network, and I send messages to other users by doing the following:
i. finger <user> - look at which port they are on.
ii. cat>/dev/pts/<port>
Is there a way of automating this?

Your help appreciated, thanks in advance.

Optimist
04-19-2001, 01:12 PM
[QUOTE]Originally posted by theclave:
[QB]Can anyone help me with writing scripts to do the following?:

1. I regularly telnet into a UNIX system, and read my mail by cd'ing to my inbox and doing cat <filename> for each message. What I want is a script that will display just the text starting 'From:' to avoid all the various crap that comes first.

Any reason why you don't use PINE ?

Opt.

goon12
04-19-2001, 01:53 PM
instead of doing all that to get a message why dont you try using the "write" command? "write <theusersname>" , type the message and then ctrl-d to send it.

Maybe not what your looking for....

theclave
04-19-2001, 02:50 PM
pine - well, I don't like it much. :)

write - ok, wasn't aware of that, I'll give it a go.