LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 11-27-2005, 09:01 PM   #1
operand
LQ Newbie
 
Registered: Sep 2005
Posts: 12

Rep: Reputation: 0
A question about BASH


Hi everyone:

I want to see the header of mails in my mailbox on Redhat Linux. So I wrote the following awkward shell :

mail < mail.input | awk '/U / {print}'

The content of file "mail.input" is just :

quit

How could I do this without the file "mail.input"?

Thanks for your attention and look forward to your replay.
 
Old 11-27-2005, 09:11 PM   #2
Robhogg
Member
 
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 85
Hi, operand.

You could try:

echo "quit" | mail | awk '/U / {print}'

Rob
 
Old 11-27-2005, 09:49 PM   #3
operand
LQ Newbie
 
Registered: Sep 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by Robhogg
Hi, operand.

You could try:

echo "quit" | mail | awk '/U / {print}'

Rob
Hi rob:

That works. Thanks a lot. ^_^ .

operand
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
BASH question robscott Linux - Software 3 11-23-2005 09:39 AM
Bash question lnxduck Programming 3 09-30-2005 08:50 AM
bash question? shanenin Linux - Software 1 11-26-2004 12:22 PM
BASH question tpe Linux - Software 6 11-17-2004 08:59 PM
little bash question gplacek Linux - General 2 09-01-2004 12:10 PM


All times are GMT -5. The time now is 06:02 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration