[phpBB Debug] PHP Notice: in file /includes/db/dbal.php on line 110: Undefined array key "cached"
[phpBB Debug] PHP Notice: in file /includes/db/dbal.php on line 111: Undefined array key "normal"
[phpBB Debug] PHP Notice: in file /includes/db/dbal.php on line 112: Undefined array key "total"
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3391: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3393: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3394: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3395: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
Cabrillo College Linux Classes • View topic - Example Test: Question 14

Example Test: Question 14

Introduction to UNIX/Linux

Example Test: Question 14

Postby Robert Lyons on Wed Dec 17, 2008 2:41 pm

What command would email you a "Time for tea" message at teatime with the subject "Reminder"?

I can easily do this using the "at" command and typing what I need at the at> prompt but if this is supposed to be done as a single command I forget (or never knew) how to specify the message text on the command line.

Can someone remind me?
User avatar
Robert Lyons
 
Posts: 20
Joined: Wed Sep 03, 2008 7:30 pm

Re: Example Test: Question 14

Postby Lyle Bergerson on Wed Dec 17, 2008 3:26 pm

Here is what I have from class:

at teatime
echo "time for tea" | mail -s "Reminder" $LOGNAME

Anyone know the proper way to get out of "at>"?
Lyle Bergerson
 
Posts: 23
Joined: Wed Sep 03, 2008 7:27 pm

Re: Example Test: Question 14

Postby Michael Wicherski on Wed Dec 17, 2008 4:31 pm

[quote="Lyle Bergerson"]
Anyone know the proper way to get out of "at>"?[/quote]

ctrl+d

(eof: end of file)
Michael Wicherski
 
Posts: 140
Joined: Mon Sep 01, 2008 5:23 am

Re: Example Test: Question 14

Postby ollie wright on Wed Dec 17, 2008 4:45 pm

I could not get it as a one liner. I think I sent a tea time message. Only 16 more minutes.
User avatar
ollie wright
 
Posts: 88
Joined: Wed Sep 03, 2008 7:28 pm

Re: Example Test: Question 14

Postby ollie wright on Wed Dec 17, 2008 5:43 pm

I got my teatime message, but it was not good.

You must specify direct recipients with -s, -c, or -b.
/bin/bash: line 3: wrigholi: command not found
/bin/bash: line 4: this is the body at 1:36/ sch for teatime: No such file or di rectory

oh well, maybe next time.
User avatar
ollie wright
 
Posts: 88
Joined: Wed Sep 03, 2008 7:28 pm

Re: Example Test: Question 14

Postby Robert Lyons on Wed Dec 17, 2008 7:08 pm

Thanks Lyle .. it seems so simple when you see it .. duh .. just use echo ..! I was thinking there must be some -option for mail that would allow you to specify the text.
User avatar
Robert Lyons
 
Posts: 20
Joined: Wed Sep 03, 2008 7:30 pm


Return to CIS 90 - Fall 2008

Who is online

Users browsing this forum: No registered users and 0 guests

cron