Sponsored Content
Top Forums Shell Programming and Scripting UNIX script for consolidated email Post 302987123 by Don Cragun on Monday 5th of December 2016 02:57:23 PM
Old 12-05-2016
Each df command will align its output. Unless the sizes of all of the fields being output by the various df commands are the same, the output from the commands will not be aligned with each other.

And you haven't bothered to tell us what operating system and shell you're using, so we don't know what features might be available on your system to force the output of the various systems from which you're retrieving data to be aligned. Some systems have an align utility; some don't.

If your system doesn't have an align utility and you know maximum field widths for each of the fields that will work every time you run your script, you can just use printf with an appropriate format string to align fields. Or, if the sizes vary from run to run, you can write an awk script to determine maximum widths and print aligned output.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

need a unix script to let me know by email or pager when the filesystem is 80% full.

Does anyone have a script to check disk space usage. My backup directory keeps filling up with archivelog files and I need a script to let me know by email or pager when the filesystem is 80% full. Thank you! (1 Reply)
Discussion started by: jzjy0r
1 Replies

2. Shell Programming and Scripting

sending email from KSH unix script.

Hi Need guidance on including code to mail a couple of files atached with some subject and mail body !!.. Thanks in advance (3 Replies)
Discussion started by: rosh0623
3 Replies

3. Shell Programming and Scripting

send a message through email to 5 people using unix script?

Hi All, I want to send a message through email to 5 people in unix script. Please let me know, how to do it.Please do reply it is urgent.How to do it?Please reply.thanks! Thanks, Mary. (2 Replies)
Discussion started by: MARY76
2 Replies

4. UNIX for Advanced & Expert Users

send a message through email to 5 people using unix script.

Hi All, I want to send a message through email to 5 people in unix script. Please let me know, how to do it.Please do reply it is urgent. Thanks, Mary. (3 Replies)
Discussion started by: MARY76
3 Replies

5. Shell Programming and Scripting

Unix Shell Script to automate email alert

Hi all, I have a task on my plate which is of high priority. I need an automated email alert that checks FTP notices subdirectory on a daily basis and forwards any word files to a group of people. This word files gets created whenever there is an issue with FTP connectivity. Please help...... (1 Reply)
Discussion started by: stunnerz_84
1 Replies

6. Shell Programming and Scripting

Unix Script to email grepped results

I am following the tread number 81556 to grep a file and send the results in email. #/bin/bash /bin/grep -i 'invite sip' /var/log/asterisk/full if echo "found" | mail -s 'invite sip' mail@gmail.com When I just build it to grep and mail, it works fine. However, the if statement causes... (4 Replies)
Discussion started by: klysdale
4 Replies

7. Shell Programming and Scripting

Consolidated output in shell script

Hi Gurus, I have a shell script which connects to mulitple DBs and run some queries and output will be written to log file.I need the consolidated output (html format will be better)from the logfile.see below for more details about my requirement. Actual output: DB_NAME TABLE_OWNER ... (9 Replies)
Discussion started by: navsan420
9 Replies

8. Shell Programming and Scripting

Automated script once user send email to UNIX server

is there any possibility to trigger a script. once the user send email to the unix server box with specific subject line. My script will search for the specific word in the unix email and run the shell script if the specific keyword is sent in the email to the unix email box. so that it can... (3 Replies)
Discussion started by: ramkumar15
3 Replies

9. Shell Programming and Scripting

UNIX script email to outlook report format

I have a ksh script that emails a report to outlook from a Unix Solaris. On server the report formatted perfectly. However, the email version the format is not. On the server report looks like this: TN Region Old SPiAD Server Order/Req Local Status NAAC Status Request Date New... (1 Reply)
Discussion started by: mrn6430
1 Replies

10. UNIX for Advanced & Expert Users

Executing of UNIX script using email

Dear Unix Leads, can you please let me know is it possible to execute a shell script in UNIX machine sending an email from outlook or gmail ? or is it possible to generate a token file in UNIX by sending email which we can indirectly use to trigger script your response on this is highly... (5 Replies)
Discussion started by: mirwasim
5 Replies
Tray(3I)						    InterViews Reference Manual 						  Tray(3I)

NAME
Tray - compose interactors into arbitrary or constrained layouts SYNOPSIS
#include <InterViews/tray.h> DESCRIPTION
A tray is a scene of interactors that overlap, tile, or have other constraints on their alignment relative to each other. One of the interactors in a tray can serve as a background for the other interactors. Constraints on the layout of interactors are made by aligning interactors to each other. Two interactors are aligned by specifying which edges coincide. For example, the lower left corner of one interactor may be aligned to the upper right of another. TGlue objects can be used to introduce transparent space between aligned interactors. TGlue has a natural size, shrinkability, and stretchability (though TGlue objects are not interactors). Trays stretch or shrink the TGlue along with the aligned interactors to satisfy the alignment constraints. The tray adopts the shape of the background interactor if there is one; otherwise, the tray's shape depends on the shapes of its components and potentially on their alignments. By default, a tray without a background takes on a width and height equal to the largest of the widths and heights of its components. However, alignments involving the tray can in effect override this default. For example, if the left and right sides of a particular component are aligned to the tray's left and right sides, respectively, then the tray's sides are constrained to coincide with the component's sides. Thus the tray will adopt the width, horizontal shrinkability, and horizontal stretchability of that component. Another example: To ensure that a tray circumscribes a collection of (mutually aligned) com- ponents, align the outer edges of the components on the periphery of the collection to the outer edges of the tray, thereby constraining the tray to assume the shape of the collection. TGLUE PUBLIC OPERATIONS
TGlue(int w = 0, int h = 0, int hstretch = hfil, int vstretch = vfil); Define TGlue of a minimum size. The TGlue can stretch from the given size but cannot shrink. TGlue(int, int, int hshrink, int hstretch, int vshrink, int vstretch); Define general TGlue with a given natural size (width and height), shrinkability, and stretchability. TRAY PUBLIC OPERATIONS
Tray(Interactor* background = nil) Create a new tray, optionally having an interactor as a background. void Align(Alignment, Interactor*, TGlue* = nil) void Align(Alignment, Interactor*, Alignment, Interactor*, TGlue* = nil) Align an interactor to another interactor (the tray itself by default), optionally with TGlue between them. Align operations insert interactors into the tray if they have not been inserted already. void Align(Alignment, Interactor*, ..., Interactor* = nil) Apply an alignment to a set of interactors. This operation is shorthand for aligning the interactors to each other explicitly. For example, Align(Left, i1, i2, i3, i4) aligns the left sides of interactors i1 through i4. Two to seven interactors can be aligned at once. void HBox(Interactor*, ..., Interactor* = nil) void VBox(Interactor*, ..., Interactor* = nil) The HBox and VBox operations align the specified interactors such that they tile left-to-right and top-to-bottom, respectively. These operations align in one dimension only. Two to seven interactors can be aligned at once. If the first (last) component is the tray or the background interactor, then the leftmost (rightmost) component will be aligned with the left (right) side of the tray. void Insert(Interactor*) Insert an interactor into the tray without an alignment. The interactor will appear in the lower left corner of the tray. void Change(Interactor*) Notify the tray that the given interactor's shape has changed. The tray will recompute the layout of its component interactors to satisfy any alignments. If the tray does not contain a background, then a change in the shape of one of its components may in turn change the tray's shape. If the tray has a background, then the tray's shape will change only if the shape of the background changes. void Remove(Interactor*) Take an interactor out of a tray and eliminate any alignments that have been made to it. SEE ALSO
Interactor(3I), Scene(3I), Shape(3I) InterViews 8 September 1988 Tray(3I)
All times are GMT -4. The time now is 05:38 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy