Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 11-27-2005, 09:01 PM   #1
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 :


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
Registered: Sep 2004
Location: Old York, North Yorks.
Distribution: Debian 7 (mainly)
Posts: 653

Rep: Reputation: 97
Hi, operand.

You could try:

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

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

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

You could try:

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

Hi rob:

That works. Thanks a lot. ^_^ .



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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:58 AM.

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