expand logic for > and <


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting expand logic for > and <
# 1  
Old 08-10-2007
expand logic for > and <

Hi

Input

A12345678901234567890 < A12345678901234567890 AND C12345678901234567890 < D12345678901234567890 AND E12345678901234567890 > F12345678901234567890

If the length of the line at any point exceed more than 60 chars it should come to next line

but it should not break a variable name


Out put should be
A12345678901234567890 < A12345678901234567890 AND
C12345678901234567890 < D12345678901234567890 AND
E12345678901234567890 > F12345678901234567890

Last edited by pbsrinivas; 08-13-2007 at 04:45 AM..
Login or Register to Ask a Question

Previous Thread | Next Thread

1 More Discussions You Might Find Interesting

1. AIX

Expand LV

Under the df command, one of my logical volumes, /dev/hd4, was showing 100% Used, so I added 2 logical partitions, but its still showing 100% used. Is there a separate command I need to execute to reallocate? (5 Replies)
Discussion started by: markper
5 Replies
Login or Register to Ask a Question
Text::Tabs(3pm) 					 Perl Programmers Reference Guide					   Text::Tabs(3pm)

NAME
Text::Tabs - expand and unexpand tabs like unix expand(1) and unexpand(1) SYNOPSIS
use Text::Tabs; $tabstop = 4; # default = 8 @lines_without_tabs = expand(@lines_with_tabs); @lines_with_tabs = unexpand(@lines_without_tabs); DESCRIPTION
Text::Tabs does most of what the unix utilities expand(1) and unexpand(1) do. Given a line with tabs in it, "expand" replaces those tabs with the appropriate number of spaces. Given a line with or without tabs in it, "unexpand" adds tabs when it can save bytes by doing so, like the "unexpand -a" command. Unlike the old unix utilities, this module correctly accounts for any Unicode combining characters (such as diacriticals) that may occur in each line for both expansion and unexpansion. These are overstrike characters that do not increment the logical position. Make sure you have the appropriate Unicode settings enabled. EXPORTS
The following are exported: expand unexpand $tabstop The $tabstop variable controls how many column positions apart each tabstop is. The default is 8. Please note that "local($tabstop)" doesn't do the right thing and if you want to use "local" to override $tabstop, you need to use "local($Text::Tabs::tabstop)". EXAMPLE
#!perl # unexpand -a use Text::Tabs; while (<>) { print unexpand $_; } Instead of the shell's "expand" comand, use: perl -MText::Tabs -n -e 'print expand $_' Instead of the shell's "unexpand -a" command, use: perl -MText::Tabs -n -e 'print unexpand $_' SUBVERSION
This module comes in two flavors: one for modern perls (5.10 and above) and one for ancient obsolete perls. The version for modern perls has support for Unicode. The version for old perls does not. You can tell which version you have installed by looking at $Text::Tabs::SUBVERSION: it is "old" for obsolete perls and "modern" for current perls. This man page is for the version for modern perls and so that's probably what you've got. BUGS
Text::Tabs handles only tabs (" ") and combining characters ("/pM/"). It doesn't count backwards for backspaces (" "), omit other non- printing control characters ("/pC/"), or otherwise deal with any other zero-, half-, and full-width characters. LICENSE
Copyright (C) 1996-2002,2005,2006 David Muir Sharnoff. Copyright (C) 2005 Aristotle Pagaltzis Copyright (C) 2012 Google, Inc. This module may be modified, used, copied, and redistributed at your own risk. Publicly redistributed modified versions must use a different name. perl v5.18.2 2014-01-06 Text::Tabs(3pm)