The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sed find word ending with eltinator Shell Programming and Scripting 2 08-22-2007 03:26 PM
never ending loop ragha81 Shell Programming and Scripting 21 10-06-2006 03:07 PM
executables ending with * binums High Level Programming 2 01-25-2006 08:39 PM
File- Ending spikylina UNIX for Dummies Questions & Answers 3 03-08-2005 01:00 AM
ssh not ending (sometimes) from inside a script, why? stilllooking Shell Programming and Scripting 1 09-16-2004 04:42 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-08-2001
Registered User
 

Join Date: Feb 2001
Location: Frankfurt Germany
Posts: 61
hello,

I a problem. I would like write script in True64 Unix.see below.

last testerkl | head > mailfile.asc
wolteru < mailfile.asc

With the "last" command I get a list when testerkl logged on. And I would like to send this to a user. But how can I write in a "ctrl.-d" and "ctrl.-c" that send and ends the mail.

Thanks

Forum Sponsor
  #2  
Old 05-09-2001
Registered User
 

Join Date: Apr 2001
Location: Geneva, Switzerland
Posts: 4
I'm not sure I've fully understood your problem. You can
mail the contents of a file by 'mail'. E.g.:

last testerkl | head > mailfile.asc
mail -s "Your subject" testerkl@his-host < mailfile.asc

I hope this helps.

-- Dolom --
  #3  
Old 05-11-2001
Registered User
 

Join Date: Feb 2001
Location: Frankfurt Germany
Posts: 61
The problem was to stop the mail deamon. because I didn't want a dead process. Since this is sent every night I was worried that it could interfer with my daily backups. But I found out that after 2 minutes the mail deamin logs out. So my problem is solved.

Just for info. "last username" is not a file. It shows the login history of the user. It give's a output. And this display output I wanted to send to a user. The "last" command can use by all users.


Thanks

From the man from germany
Google The UNIX and Linux Forums
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 09:29 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0