Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Format columns and heads using shell script Post 302986749 by drl on Tuesday 29th of November 2016 09:39:36 PM
Old 11-29-2016
Hi.

I've used align for years on a number of platforms. Details are below.

To see demonstrations, search for align drl on this site ... cheers, drl
Code:
align   Align columns of text. (what)
Path    : ~/p/stm/common/scripts/align
Version : 1.7.0
Length  : 270 lines
Type    : Perl script, ASCII text executable
Shebang : #!/usr/bin/perl
Help    : probably available with --help
Home    : http://kinzler.com/me/align/
Modules : (for perl codes)
 Getopt::Std    1.10

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script to separte columns...

Hi all, I have a data file and need to load the data into tables in a database. The problem is I cannot use a while loop with each line as the data is free text and has all kinds of weird characters including carriage returns and new line characters. Each column is separated by ~^~ and a new line... (2 Replies)
Discussion started by: sam_78_nyc
2 Replies

2. Shell Programming and Scripting

Help writing shell script in c++ format

how would i write a shell script to count number of one-line comments in a c++ file. if anyone knows any good books or internet sites for shell script would be much apprecitied thanks (2 Replies)
Discussion started by: deadleg
2 Replies

3. Solaris

format file using shell script

Hi All, I am new to shell scripts. I have a requirement to change the format of a file. Here is the original file: #student layout student_name student_class student_subject david 5 chemistry paul 4 physics steve 6 mathematics This is the format i need: k1,david,5,chemistry... (1 Reply)
Discussion started by: balajim
1 Replies

4. Solaris

format file using shell script

my question "format file using shell script " is not a homework. bad guess. my actual file is much more complex. the requirement is to format the file before i can read it from SAP. so i'd appreciate if any inputs can be provide. i've tried most of the commands like tr and sed and nawk, no... (2 Replies)
Discussion started by: balajim
2 Replies

5. UNIX for Advanced & Expert Users

shell script to format .CSV data

Hi all, I have written a shell script to search a specified directory (e.g. /home/user) for a list of specific words (shown as ${TMPDIR}/wordlist below). The script works well enough, but I was wondering if there was a way to display the line number that the word is found on? Thanks! cat... (1 Reply)
Discussion started by: tmcmurtr
1 Replies

6. Shell Programming and Scripting

shell script | bc syntax format

sorry but need help http://i.investopedia.com/inv/articles/site/CalculationEMA.gif trying to achieve ema in script I have this syntax which errors ema=` ; the 0.153846154 ='s Smoothing Factor really appreciate help (3 Replies)
Discussion started by: harte
3 Replies

7. Shell Programming and Scripting

XML dateTime format in shell script

How can i frame current date & time in the xml standard dateTime format in shell script 2011-10-18T12:00:00.000000 I got up to the date format using the below code date '+%Y'-'%m'-'%d'T ---------- Post updated at 09:10 AM ---------- Previous update was at 08:53 AM ---------- ... (6 Replies)
Discussion started by: vel4ever
6 Replies

8. Shell Programming and Scripting

Change date format in shell script

Plz help me To display date in the mm/dd/yyyy. Eg. if date is 28-09-2012 the output of the shell script should be date 09/28/2012. (1 Reply)
Discussion started by: shivasaini
1 Replies

9. Shell Programming and Scripting

Format CSV file from a shell script

I have a shell script which creates a CSV files. there are 3 fields, field1, field2 and comp. I will generates the values for field1 and field2 and Want to compare both. If field1>filed2 then comp should be success written in green in CSV file, else it should fail in red color. How can I change the... (5 Replies)
Discussion started by: sauravrout
5 Replies

10. Shell Programming and Scripting

Shell script change new format on the file.

Hi---Is there's way can write small shell script or perl script open "abc.txt" file and create new "new_abc.txt" file with format output below? Thanks cat abc.txt ###########################Readme############################### Contained with this README.TXT file are all of the file... (7 Replies)
Discussion started by: dotran
7 Replies
align(3U)						    InterViews Reference Manual 						 align(3U)

NAME
AlignCmd, AlignToGridCmd - commands for aligning interactors to each other and to a grid SYNOPSIS
#include <Unidraw/Commands/align.h> DESCRIPTION
AlignCmd is a purely interpretive command for aligning selected components with respect to one another. For example, it can align the left sides of selected components so that they coincide. AlignToGridCmd is interpreted by selected GraphicView objects to align themselves to the grid (if any) associated with the viewer in which they appear. Each component can thus define what it means to align itself to the grid. ALIGNCMD PUBLIC OPERATIONS
AlignCmd( ControlInfo*, Alignment reference = Left, Alignment affected = Left ) AlignCmd(Editor* = nil, Alignment = Left, Alignment = Left) The constructor takes optional arguments for specifying the alignment desired. The reference parameter specifies a point on a fixed reference component. The affected parameter specifies a point on components that will move to realize the alignment. The defaults for these parameters specify that all affected components should align their left sides to reference's left side. void GetAlignment(Alignment&, Alignment&) Return the alignment parameters specified in the constructor. GraphicComp* GetReference(GraphicComp* affected) Return the reference component given a potentially affected component. If affected appears in the AlignCmd's clipboard, then GetRe- ference returns the GraphicComp preceding it in the clipboard. If affected is the first component in the clipboard or if it is not on the clipboard, then GetReference returns the first component on the clipboard. ALIGNTOGRIDCMD PUBLIC OPERATIONS
AlignToGridCmd(ControlInfo*) AlignToGridCmd(Editor* = nil) Construct an AlignToGridCmd. virtual void Execute() virtual void Unexecute() AlignToGridCmd redefines Execute to let the selected GraphicView objects interpret the command the first time. This lets the compo- nents determine the proper grid with which to align themselves and the amount of movement required. Execute assumes that Graph- icView objects will use the Align operation (described below) to compute the amount of movement, store it in a MoveData object, and finally issue a MoveCmd to the subject for interpretation. Unexecute simply calls Unmove (described below) to reverse the Align's effects. virtual void Align(GraphicView*, float, float) virtual void Unalign(GraphicView*) GraphicView objects interpreting the AlignToGridCmd should use the Align operation to specify a point to align to the grid that affects them. Align will effectively move the component so that the given point falls on the grid. It will also store the amount of movement in this by calling Store with a MoveData object. Finally, Align calls Move (described below) to actually move the com- ponent that amount. Unalign provides a public interface to reversing the effects of Align by simply calling Unmove with its argu- ment's subject. ALIGNTOGRIDCMD PROTECTED OPERATIONS
void Move(GraphicComp*) void Unmove(GraphicComp*) Move produces a MoveCmd based on the MoveData stored for the given GraphicComp and tells the GraphicComp to interpret the MoveCmd. Conversely, Unmove produces a MoveCmd based on the the same information and tells the GraphicComp to uninterpret it. SEE ALSO
Command(3U), GraphicComp(3U), GraphicView(3U), Grid(3U), Viewer(3U), datas(3U), transforms(3U) Unidraw 23 January 1991 align(3U)
All times are GMT -4. The time now is 11:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy