Sponsored Content
Top Forums Shell Programming and Scripting 2 carriage return within a record Post 302548271 by zaxxon on Thursday 18th of August 2011 02:23:42 AM
Old 08-18-2011
Did you try out my example?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Capture carriage return.

I try to test the carriage return in a variable. $ LENGTH=`expr $VARIABLE : ".*"` will return the length of the variable. But this doesn't work if $VARIABLE has zero length. Any help will be well appreciated. Thanks in advance. Giovanni (4 Replies)
Discussion started by: gio123bg
4 Replies

2. Shell Programming and Scripting

Removing Carriage return to create one record

I have a file with multiple records in it and want to create a single record by removing all the carriage returns, is there a sed command or another command that will easily allow this to happen. current layout 813209A 813273C 812272B expected result 813209A813273C812272B previously I... (3 Replies)
Discussion started by: r1500
3 Replies

3. Shell Programming and Scripting

Dont want carriage return

I have observed with print & echo, they produce carriage return <CR> or newline, after they display string next to them. Is there anyway to avoide these <CR> after the intended string is displayed? (3 Replies)
Discussion started by: videsh77
3 Replies

4. UNIX for Dummies Questions & Answers

carriage return and linefeed

hi can anyone please tell me the difference between carriage return, linefeed and newline ? (2 Replies)
Discussion started by: streetfi8er
2 Replies

5. Shell Programming and Scripting

Lost carriage return when assign

Hello . Now i have a different problem, lost "carriage return" when assigning a variable. The assignation is done in a peculair way but its ok. The variable "v_tmp" have spaces and carriage return. Its created with v_tmp=`echo $i | awk '.........'` And the assignation where i lost all the... (6 Replies)
Discussion started by: trutoman
6 Replies

6. Shell Programming and Scripting

Remove carriage return in a record

Hi all gurus, I need help in removing carriage return existed within a record delimited by pipe <|>. Sample: A_01|Test1|Testing1|Remarks1 A_02|Test2|Test ing2|Remarks2 A_03|Test3|Testing3| Remarks3 Desire output: A_01|Test1|Testing1|Remarks1 A_02|Test2|Testing2|Remarks2... (10 Replies)
Discussion started by: agathaeleanor
10 Replies

7. Shell Programming and Scripting

Search_Replace with a Carriage Return

Hey folks, I've been working on this for some time. Seems simple, but I'm stumped. I need the following data format: New_York:Commercial Geology Geophysics Petrophysics Production_Engineering Reservoir_Engineering Pasadena:Commercial ... (5 Replies)
Discussion started by: leepet01
5 Replies

8. Shell Programming and Scripting

Carriage return ksh

Hello, How do i usecarriage return in ksh. I want to do an echo "bla bla" and another echo "bla bla" will appear and replace the first echo on screen. I tried: until ; do echo "bla bla \r" done please advice. Thanks. (3 Replies)
Discussion started by: LiorAmitai
3 Replies

9. Shell Programming and Scripting

Substitute \n with carriage return

Hello all, I've a flat file in the following format: AB\001\CDED\001\ABC\001\nEG\001\HIJF\001\EFG\001\nHI\003\HIUL\003\HIJ\003 And I want to substitute \n with the carriage return. Any help is appreciated! Regards, - Seth (8 Replies)
Discussion started by: sethmj
8 Replies

10. UNIX for Dummies Questions & Answers

Remove carriage return

I need to remove the carriage return comes inbetween the record. Need to have CR only at the end. I used the below command. tr -d '\n' < filewithcarriagereturns > filewithoutcarriagereturns But its removing all the CR and giving one line output. Input File: 12345 abcdegh... (11 Replies)
Discussion started by: srvn_saru
11 Replies
Text::FormatTable(3pm)					User Contributed Perl Documentation				    Text::FormatTable(3pm)

NAME
Text::FormatTable - Format text tables SYNOPSIS
my $table = Text::FormatTable->new('r|l'); $table->head('a', 'b'); $table->rule('='); $table->row('c', 'd'); print $table->render(20); DESCRIPTION
Text::FormatTable renders simple tables as text. You pass to the constructor (new) a table format specification similar to LaTeX (e.g. "r|l|5l|R|20L") and you call methods to fill the table data and insert rules. After the data is filled, you call the render method and the table gets formatted as text. Methods: new($format) Create a Text::FormatTable object, the format of each column is specified as a character of the $format string. The following formats are defined: l Left-justified top aligned word-wrapped text. L Left-justified bottom aligned word-wrapped text. r Right-justified top aligned word-wrapped text. R Right-justified bottom aligned word-wrapped text. 10R, 20r, 15L, 12l, Number is fixed width of the column. Justified and aligned word-wrapped text (see above). ' ' A space. | Column separator. head($col1, $col2, ...) Add a header row using $col1, $col2, etc. as cell contents. Note that, at the moment, header rows are treated like normal rows. row($col1, $col2, ...) Add a row with $col1, $col2, etc. as cell contents. rule([$char]) Add an horizontal rule. If $char is specified it will be used as character to draw the rule, otherwise '-' will be used. render([$screen_width]) Return the rendered table formatted with $screen_width or 79 if it is not specified. SEE ALSO
Text::ASCIITable COPYRIGHT
Copyright (c) 2001-2004 Swiss Federal Institute of Technology, Zurich. (c) 2009 Trey Harris All Rights Reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. CODE REPOSITORY
Git - http://github.com/treyharris/Text-FormatTable/tree/master AUTHOR
David Schweikert <dws@ee.ethz.ch> Maintained by Trey Harris <treyharris@gmail.com> Fixed column width and bottom alignment written by Veselin Slavov <vslavov@creditreform.bg> perl v5.10.0 2009-07-24 Text::FormatTable(3pm)
All times are GMT -4. The time now is 11:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy