LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-17-2017, 03:36 PM   #1
abraham.bruck
LQ Newbie
 
Registered: Oct 2017
Posts: 2

Rep: Reputation: Disabled
mail - stops listing after 34 lines with a "?"


Hope all is well with you and yours.

I have a quick Linux mail question.

I need to get some data from all received mail and load it into the PostgreSQL DB. I use fetchmail to get them from a remote server and they go to /var/mail/abruck

There are 2 lines that I need from each email: Date and Subject.

When I just type "mail" to get the mail content, I get exactly what I want:
Code:
 U   1 Dispatch Team      Tue Oct 17 11:55 192/11778 (FOLLOW-UP) 1 - Emergency Work Order# WO-0003342 at (Ranch) | ETA NEEDED - CRM:01136317
 U   2 Dispatch Team      Tue Oct 17 11:55 289/18637 4 - Normal Work Order# WO-0003304 SCHEDULED for 8/8/2017 4:30 PM (Wents) - CRM:01136334
 U   3 Dispatch Team      Tue Oct 17 11:55 289/18637 4 - Normal Work Order# WO-0003304 SCHEDULED for 8/9/2017 4:00 PM (Wents) - CRM:01136338
......
 U  33 Dispatch Team      Tue Oct 17 11:55 187/11550 (FOLLOW-UP) 2 - Critical Work Order# WO-0002897 at (Caas) | ETA NEEDED - CRM:01136469
 U  34 Dispatch Team      Tue Oct 17 11:55 190/11725 (FOLLOW-UP) 1 - Emergency Work Order# WO-0003342 at (Ranch) | ETA NEEDED - CRM:01136473
?
except that it stops after 34 lines with a "?"

How can I get ALL the emails without stopping every 34 lines with a "?". I want go > it all into one file.

Greatly appreciate your time and efforts ...
 
Old 10-17-2017, 04:20 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,733

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
What have you tried?
man mail ??
 
Old 10-18-2017, 01:49 AM   #3
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
abraham.bruck, please understand that this is one of the historically oldest UNIX (not Linux!) commands.
The UI is not exactly rich.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
mail - stops listing after 34 lines with a "?" abraham.bruck Linux - Newbie 1 10-18-2017 07:02 AM
[SOLVED] recursively listing files' first lines atjurhs Linux - Newbie 2 03-28-2017 02:41 PM
Listing all users who currently have mail in inbox ben1173 Linux - Newbie 1 10-25-2010 11:55 PM
mail flow stops cc_karthik Linux - Server 1 04-16-2008 03:33 AM
listing non-comment lines scbops Linux - Newbie 5 09-18-2007 08:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:46 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration