Austin Group Defect Tracker

Aardvark Mark IV


Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0001368 [1003.1(2016/18)/Issue7+TC2] Shell and Utilities Editorial Enhancement Request 2020-07-08 23:10 2020-07-08 23:10
Reporter steffen View Status public  
Assigned To
Priority normal Resolution Open  
Status New  
Name Steffen Nurpmeso
Organization
User Reference
Section Vol. 3: Shell and Utilities, at, batch
Page Number 2479, 2523
Line Number 79636 ff., 81458 ff.
Interp Status ---
Final Accepted Text
Summary 0001368: Unworldly use of redirection and mailx(1) in at(1) and batch(1) examples.
Description The sequence

 at now + 1 hour <<!
 diff file1 file2 2>&1 >outfile | mailx mygroup
 !

(likewise for batch(1)) sends out a possibly empty message to the work group "mygroup", which is a very low quality example that seems unworldly.
Desired Action If the -E option of mailx(1) becomes standardized (as requested in issue #1367) the above could become wonderful examples for the power of the *X shell environment, and simply be changed to

 at now + 1 hour <<!
 diff file1 file2 2>&1 >outfile | mailx -E mygroup
 !

(likewise for batch(1)). Otherwise change

 at now + 1 hour <<!
 diff file1 file2 2>&1 >outfile | mailx -E mygroup
 !

to

 2. This sequence, which demonstrates redirecting standard error to a pipe, and carefully avoiding of false conditional status codes, is useful in a command procedure (the sequence of output redirection specifications is significant),

 at now + 1 hour <<!
 exec >errfile
 diff file1 file2 2>&1 >outfile
 if [ -s errfile ]; then
   < errfile mailx mygroup
 fi
 !
Tags No tags attached.
Attached Files

- Relationships
related to 0001367New mailx: add -E option to discard (not send) empty messages 

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2020-07-08 23:10 steffen New Issue
2020-07-08 23:10 steffen Name => Steffen Nurpmeso
2020-07-08 23:10 steffen Section => Vol. 3: Shell and Utilities, at, batch
2020-07-08 23:10 steffen Page Number => 2479, 2523
2020-07-08 23:10 steffen Line Number => 79636 ff., 81458 ff.
2020-07-09 08:02 geoffclare Relationship added related to 0001367


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker