The general alignment program align provides a feature for processing only lines on which patterns match:
producing:
The code for align can be obtained from the URL noted in the first part of the script.
Best wishes ... cheers, drl
Last edited by drl; 08-24-2014 at 02:27 PM..
Reason: Edit 1 - correct minor typo.
Howdy,
Supposing I want to output the following code to the screen in a bash script, this works fine until you use variables as below, because the variable could be of any length, meaning the screen output for line 2 will have the ultimate # out of alignment.
Is there a simple way round this?... (1 Reply)
Hi,
I have tcp/ip client server programs which will communicate through reqest,reply c-structures.
As the sizeof(struct) may give different value between client and server programs, how do i align properly for boundary conditions.
Could anybody please give some suggestion.
Thanks in... (3 Replies)
Hello,
Is there anyway that I can align a pipe delimited text file by the maxium field length where the field is separated out by pipes for large text files with more than
100,000 rows?
So, far I have searched other forums and google about aligning text files in unix and I have noticed that... (7 Replies)
Hi All,
I have two sets of files with names .dat and .txt. The number of files is really large more than 90000. The files have names like 1.dat, 2.dat,3.dat and so on where as txt files have names like 1.txt, 2.txt, 3.txt and so on
The DAT and TXT files are equal in number. About 90000 each
... (4 Replies)
Hi All,
I am new to perl and was trying to write a simple program which will generate a text file as output..
now the output which i am getting is something like this..
==================================================================================================
Col1 ... (8 Replies)
Hello friends
Please help me to display the content of a file in specific aligned manner.
for ex.
the content of the file may be
>$TEST
WELCOME
HI
HELLO
UNIX
SHELL
SCRIPTING
>$
I want to display the content like
.
TEST WELCOME HI
HELLO ... (18 Replies)
Hello Gurus !
I have what probably amounts to a few simply changes to fix; however for the life of me I cannot seem to get it ti work. I need to align the output of my script (I am writing to a logfile)... here's the lines in my code:
if
then
echo "NODE: $node" >> $logfile... (6 Replies)
Hi Guys,
How can you align data getting the UID, GID HOSTNAME in same column
input:
server1
uid=1010(faculty) gid=700(teacher) groups=700(teacher), 800(models)
student:x:500:500:student:/home/student:/bin/bash
server2
uid=1010(OSAD) gid=700(teacher) groups=700(teacher), 809(staff)... (5 Replies)
is there any way to align my text so every column begins on the same line as the previous line?
here's my command:
printf "THEN ( ${SEARCHPATTB} = Hour = ${CALTOTB} ) %8s => %8s NOW ( ${SEARCHPATT} = Hour = ${CALTOT} ) %7s => %7s Reduced By: %7s -${RESULT}"\\n
output i'm currently getting... (2 Replies)
Shell script logic
Hi
I have 2 input files like with file 1 content as (file1)
"BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt
File 2 contents as fle(2)
"BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt
I want to get... (22 Replies)
Discussion started by: pottic
22 Replies
LEARN ABOUT SUNOS
align
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)