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)
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT OSX
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)