Sponsored Content
Full Discussion: Left Align of Text File
Top Forums Shell Programming and Scripting Left Align of Text File Post 302683431 by leafei on Wednesday 8th of August 2012 02:52:56 AM
Old 08-08-2012
Have you tried:
Code:
echo "hiddenhausen  99.60   y  1.05  2.50  -550  -110  1:25:200..." | column -t

These 2 Users Gave Thanks to leafei For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Align Text from a file.

I need to align text from a file that has columns seperated by spaces and commas. Any ideas? Text is similar to this. File Name is Test. 05/14/06 13:46:56.575 ,TEST,5,123,1234,123,12345,12,12.2,2.1,4.5,5.23 05/14/06 13:49:58.009 ,TEST,6,456,456.7,45,4.56,453,34,54.3,3.2,6.456 (9 Replies)
Discussion started by: earlepps
9 Replies

2. Shell Programming and Scripting

Align Text within <p> Tags in a HTML file.

Hi All !!! I have an HTML file whose contents are as below: <html> <body> <title>This is a test file</title> <p>PLEASE ALIGN ME IN ONE LINE. TEXT....</p> <h2>This is a Test file</h2> <p>PLEASE ALIGN ME IN ONE LINE. TEXT....</p> </body> </html> (2 Replies)
Discussion started by: parshant_bvcoe
2 Replies

3. Shell Programming and Scripting

Howto process log file from where it left

Hi all I am doing some matching apache access log processing.Now i want a some way that i can start log search/process from where it left.Can any one give me ideads. (1 Reply)
Discussion started by: aliahsan81
1 Replies

4. Shell Programming and Scripting

Get the ipaddress and align based on the input file

Hi All, I have a file contains below contents, "interfacename/subnet: public (or) interfacename/subnet:cluster_interconnect" "en2"/10.185.81.0:cluster_interconnect,"en5"/10.185.81.0:cluster_interconnect,"en6"/169.181.146.0:public... (6 Replies)
Discussion started by: kamauv234
6 Replies

5. Shell Programming and Scripting

File count from where it left??

i have this code num=1 dat10=`date "+%m/%d/%Y" -d "+10 days"` dat=`date "+%m/%d/%Y"` set -x grep "text=.&" /root/Softwares/apache-tomcat-5.5.30/logs/catalina.out|awk -F"from=" '{print $2}'|awk -F"opid" '{print $1}'|sort|uniq > pnos while read line do psql -U poss -d emsver -c "insert into... (3 Replies)
Discussion started by: nikhil jain
3 Replies

6. Solaris

File system full - not removed: No space left on device

Does anyone have any advise on trying to clean up a full filesystem? I can't rm any files because of the follow: not removed: No space left on device Any help would be very much appreciated. (10 Replies)
Discussion started by: craigsky
10 Replies

7. Shell Programming and Scripting

Align columns

Hi, I have a question on how to align columns in shellscipt. SAMPLE 2015-07-15 09:01:00.0 |TCSERVER01 |10965 2015-07-15 09:02:00.0 |TCSERVER01 |4752 2015-07-15 09:03:00.0 |TCSERVER01 |4805 2015-07-15 09:04:00.0 |TCSERVER01 |3690 2015-07-15 09:01:00.0 |TCSERVER02 |8703 2015-07-15... (1 Reply)
Discussion started by: reignangel2003
1 Replies

8. Shell Programming and Scripting

Ftp with bash, append file where left off

I'm working on a bash script to finish uploading a file. I need a way to get $filesize so that "restart $filesize" will work. Here is my script: ftp -n -v <<END_SCRIPT open ftp.$domain user $user@$domain $password size $file restart $filesize put $file quit END_SCRIPTWayne Sallee... (9 Replies)
Discussion started by: WayneSallee
9 Replies

9. UNIX for Beginners Questions & Answers

How to align/sort the column pairs of an csv file, based on keyword word specified in another file?

I have a csv file as shown below, xop_thy 80 avr_njk 50 str_nyu 60 avr_irt 70 str_nhj 60 avr_ngt 50 str_tgt 80 xop_nmg 50 xop_nth 40 cyv_gty 40 cop_thl 40 vir_tyk 80 vir_plo 20 vir_thk 40 ijk_yuc 70 cop_thy 70 ijk_yuc 80 irt_hgt 80 I need to align/sort the csv file based... (7 Replies)
Discussion started by: dineshkumarsrk
7 Replies

10. Shell Programming and Scripting

Match text to lines in a file, iterate backwards until text or text substring matches, print to file

hi all, trying this using shell/bash with sed/awk/grep I have two files, one containing one column, the other containing multiple columns (comma delimited). file1.txt abc12345 def12345 ghi54321 ... file2.txt abc1,text1,texta abc,text2,textb def123,text3,textc gh,text4,textd... (6 Replies)
Discussion started by: shogun1970
6 Replies
Text::Align(3pm)					User Contributed Perl Documentation					  Text::Align(3pm)

NAME
GD::Text::Align - Draw aligned strings SYNOPSIS
use GD; use GD::Text::Align; my $gd = GD::Image->new(800,600); # allocate colours, do other things. my $align = GD::Text::Align->new($gd valign => 'top', halign => 'right', ); $align->set_font('arial', 12); $align->set_text('some string'); @bb = $align->bounding_box(200, 400, PI/3); # you can do things based on the bounding box here $align->draw(200, 400, PI/3); DESCRIPTION
GD::Text::Align provides an object that draws a string aligned to a coordinate at an angle. For builtin fonts only two angles are valid: 0 and PI/2. All other angles will be converted to one of these two. METHODS
This class inherits everything from GD::Text. I will only discuss the methods and attributes here that are not discussed there, or that have a different interface or behaviour. Methods directly inherited include "set_text" and "set_font". GD::Text::Align->new($gd_object, attrib => value, ...) Create a new object. The first argument to new has to be a valid GD::Image object. The other arguments will be passed on to the set method. $align->set(attrib => value, ...) Set an attribute. Valid attributes are the ones discussed in GD::Text and: valign, halign Vertical and horizontal alignment of the string. See also set_valign and set_halign. colour, color Synonyms. The colour to use to draw the string. This should be the index of the colour in the GD::Image object's palette. The default value is the last colour in the GD object's palette at the time of the creation of $align. $align->get(attribute) Get the value of an attribute. Valid attributes are all the attributes mentioned in GD::Text, the attributes mentioned under the "set" method and x, y and angle The x and y coordinate and the angle to be used. You can only do this after a call to the draw or bounding_box methods. Note that these coordinates are not necessarily the same ones that were passed in. Instead, they are the coordinates from where the GD methods will start drawing. I doubt that this is very useful to anyone. Note that while you can set the colour with both 'color' and 'colour', you can only get it as 'colour'. Sorry, but such is life in Australia. $align->set_valign(value) Set the vertical alignment of the string to one of 'top', 'center', 'base' or 'bottom'. For builtin fonts the last two are the same. The value 'base' denotes the baseline of a TrueType font. Returns true on success, false on failure. $align->set_halign(value) Set the horizontal alignment of the string to one of 'left', 'center', or 'right'. Returns true on success, false on failure. $align->set_align(valign, halign) Set the vertical and horizontal alignment. Just here for convenience. See also "set_valign" and "set_halign". Returns true on success, false on failure. $align->draw(x, y, angle) Draw the string at coordinates x, y at an angle angle in radians. The x and y coordinate become the pivot around which the string rotates. Note that for the builtin GD fonts the only two valid angles are 0 and PI/2. Returns the bounding box of the drawn string (see "bounding_box()"). $align->bounding_box(x, y, angle) Return the bounding box of the string to draw. This returns an eight-element list (exactly like the GD::Image->stringTTF method): (x1,y1) lower left corner (x2,y2) lower right corner (x3,y3) upper right corner (x4,y4) upper left corner Note that upper, lower, left and right are relative to the string, not to the canvas. The bounding box can be used to make decisions about whether to move the string or change the font size prior to actually drawing the string. NOTES
As with all Modules for Perl: Please stick to using the interface. If you try to fiddle too much with knowledge of the internals of this module, you may get burned. I may change them at any time. You can only use TrueType fonts with version of GD > 1.20, and then only if compiled with support for this. If you attempt to do it anyway, you will get errors. In the following, terms like 'top', 'upper', 'left' and the like are all relative to the string to be drawn, not to the canvas. BUGS
Any bugs inherited from GD::Text. COPYRIGHT
copyright 1999 Martien Verbruggen (mgjv@comdyn.com.au) SEE ALSO
GD, GD::Text, GD::Text::Wrap perl v5.12.3 2003-02-24 Text::Align(3pm)
All times are GMT -4. The time now is 08:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy