Thanks for the timely help rad. Your code does the job without shuffling the output.
I did test it for 15+ rows of actual inputs and it worked like a charm. I did some adjustments to the code ( not much) .
I am posting the sed arguments used in my script to format the input items.
See if I am using the correct syntax and How can I make sure that there is only one space between the col 1 & 2 ( in my input file) using SED.
Or
To put in simple words I just need the lines with strings VIRTUAL/SERVICE/POOL/MEMBER.
I do not require the rest of the items as they are junk strings.
Thanks.
Last edited by bluethunder; 11-29-2009 at 12:10 PM..
looking to do the following...
What the data looks like
server1 02/01/2008 groups 10
server1 03/01/2008 groups 15
server1 04/01/2008 groups 20
server2 02/01/2008 users 50
server2 03/01/2008 users 75
server2 04/01/2008 users 100
server2 04/01/2008 users 125
What I would like the... (1 Reply)
I have a file like the one given below
P1|V1|V2
P1|V1|V3
P1V1|V2
P2|V1|V4
P2|V2|V6
P2|V1|V4
I want it convert to
P1|V1|V2|V2|V3
P2|V1|V4|V2|V6
2nd and 3rd column should be considered as together and so the tird row is duplicate
Any ideas? (3 Replies)
I'm working on a different stage of a project that someone helped me address elsewhere in these threads.
The .docs I'm cycling through look roughly like this:
1 of 26 DOCUMENTS
Copyright 2010 The Age Company Limited
All Rights Reserved
The Age (Melbourne, Australia)
November 27, 2010... (9 Replies)
I have 1000s of these rows that I would like to transpose to columns. However I would like the transpose every 3 consecutive rows to columns like below, sorted by column 3 and provide a total for each occurrences. Finally I would like a grand total of column 3.
21|FE|41|0B
50\65\78
15... (2 Replies)
I have to create a Perl script which will transpose the data output from my experiment, from columns to rows, in order for me to analyse the data.
I am a complete Perl novice so any help would be greatly appreciated.
The data as it stands looks like this:
Subject Condition Fp1 ... (12 Replies)
Hi, I need to transpose columns of my files into rows and save it as individual files. sample contents of the file below.
0.9120 0.7782 0.6959 0.6904 0.6322 0.8068 0.9082
0.9290 0.7272 0.9870 0.7648 0.8053 0.8300 0.9520
0.8614 0.6734 0.7910 0.6413 0.7126 0.7364 0.8491
0.8868 0.7586 0.8949... (8 Replies)
Here is the contents of an input file.
A,1,2,3,4
10,aaa,bbb,ccc,ddd
11,eee,fff,ggg,hhh
12,iii,jjj,lll,mmm
13,nnn,ooo,ppp
I wanted the output to be
A
10 1 aaa
10 2 bbb
10 3 ccc
10 4 ddd
11 1 eee
11 2 fff
11 3 ggg
11 4 hhh .....
and so on How to do it in ksh... (9 Replies)
Okay folks, here's a question. I tried searching but couldn't find exactly what I needed.
I have a text file (excerpt below). This text file is an extract I did from several hundred pages of datasheets using grep so I could look only at the site history for each site. The problem is that... (2 Replies)
Hi,
I am trying to transpose rows to columns for thousands of records. The problem is there are records that have the same lines that need to be separated. the input file as below:-
ID 1A02_HUMAN
AC P01892; O19619; P06338; P10313; P30444; P30445; P30446; P30514;
AC Q29680; Q29837;... (2 Replies)
Discussion started by: redse171
2 Replies
LEARN ABOUT DEBIAN
textutil_string
textutil::string(3tcl) Text and string utilities, macro processing textutil::string(3tcl)__________________________________________________________________________________________________________________________________________________NAME
textutil::string - Procedures to manipulate texts and strings.
SYNOPSIS
package require Tcl 8.2
package require textutil::string ?0.7?
::textutil::string::chop string
::textutil::string::tail string
::textutil::string::cap string
::textutil::string::uncap string
::textutil::string::longestCommonPrefixList list
::textutil::string::longestCommonPrefix ?string...?
_________________________________________________________________DESCRIPTION
The package textutil::string provides miscellaneous string manipulation commands.
The complete set of procedures is described below.
::textutil::string::chop string
A convenience command. Removes the last character of string and returns the shortened string.
::textutil::string::tail string
A convenience command. Removes the first character of string and returns the shortened string.
::textutil::string::cap string
Capitalizes the first character of string and returns the modified string.
::textutil::string::uncap string
The complementary operation to ::textutil::string::cap. Forces the first character of string to lower case and returns the modified
string.
::textutil::string::longestCommonPrefixList list
::textutil::string::longestCommonPrefix ?string...?
Computes the longest common prefix for either the strings given to the command, or the strings specified in the single list, and
returns it as the result of the command.
If no strings were specified the result is the empty string. If only one string was specified, the string itself is returned, as it
is its own longest common prefix.
BUGS, IDEAS, FEEDBACK
This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category textutil
of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for
either package and/or documentation.
SEE ALSO regexp(3tcl), split(3tcl), string(3tcl)KEYWORDS
capitalize, chop, common prefix, formatting, prefix, string, uncapitalize
CATEGORY
Text processing
textutil 0.7 textutil::string(3tcl)