01-29-2008
The script ran through the file and gave me a output, however it didn't remove the 4th column. Everything seems to be there that was there originally but it is scattered all over the place instead of in columns. Not really sure.
What part of the request was the script addressing? I will keep playing with it for the time being to see if I can get different results. Thanks for the help
Looking over the file again it does seem to have removed something but i am not quite sure at which point yet. Will
update once I know. I do know that alot of the data that I wanted removed is still in place however.
::Update::
Ok what it appears to be doing is once it removes the columns on the first line, it is then pulling the second line up to the first line and going to the second line and removing that same section on the second line and so on down the entire document. The totals section appears to be in tact, however it did lose its formating so it is rather hard to tell since it is scattered.
Thanks
Last edited by DerangedNick; 01-29-2008 at 08:25 PM..
Reason: Findings
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
cat ABC.log | egrep "Error 500" >> /tmp/Logs.log
egrep "<Mango>.*<.Mango>" Logs.log | sed -e "s/^.*<Mango/<Mango/" | cut -f2 -d">"| cut -f1 -d"<" >> /tmp/temp1.xls
egrep "<Apple>.*<.Apple>" Logs.log | sed -e "s/^.*<Apple/<Apple/" | cut -f2 -d">"| cut -f1 -d"<" >> /tmp/temp2.xls
print Heading1,... (1 Reply)
Discussion started by: pk_eee
1 Replies
2. Shell Programming and Scripting
Hi ,
I have a typical situation. I have 4 files and with different headers (number of headers is varible ).
I need to make such a merged file which will have headers combined from all files (comman coluns should appear once only).
For example -
File 1
H1|H2|H3|H4
11|12|13|14
21|22|23|23... (1 Reply)
Discussion started by: marut_ashu
1 Replies
3. UNIX for Dummies Questions & Answers
Hi All,
I am new to UNIX can you please help me to sort a file with different columns
my file looks like this
$ cat gaut.txt
UID PID PPID PGID SID C STIME TTY TIME CMD
liveuser 3008 2892 3008 3008 0 11:58 ? 00:00:00 gnome-session
liveuser 3019 1 ... (8 Replies)
Discussion started by: cgk1983
8 Replies
4. Shell Programming and Scripting
Hi ,
Pls help on this.
Input file:
NAME1 BSC1
TEXT ID 1
MAINSFAIL
TEXT ID 2
DGON
TEXT ID 3
lOADONDG
NAME2 BSC2
TEXT ID 1
DGON
TEXT ID 3
lOADONG (1 Reply)
Discussion started by: bha148
1 Replies
5. Shell Programming and Scripting
Hi All,
I'm looking for a script which can transpose field names from column headers to values in one column.
for example, the input is:
IDa;IDb;IDc;PARAM1;PARAM2;PARAM3;
a;b;c;p1val;p2val;p3val;
d;e;f;p4val;p5val;p6val;
g;h;i;p7val;p8val;p9val;
into the output like this:
... (6 Replies)
Discussion started by: popesk
6 Replies
6. Shell Programming and Scripting
Hello Everyone!
I am new on this forum and this is my first post. I wish to apologize for my, not canonical, English.
I would like to solve this problem but I have no clue of how do it!I will be grateful if someone could help me!
I have a table like this:
gene TF1 TF2 TF3 TF4
gene1 1 2 3 4... (5 Replies)
Discussion started by: giuliangiuseppe
5 Replies
7. Shell Programming and Scripting
Hi All,
The below sar -u command generates multiple column headers in csv file
Expected output should print column headers only once in the csv file
shell script:
$cat sar_cpu_EBS.sh
#!/bin/bash
while ; do
sar -u 15 1 | awk '/^/ {print $1,$2,$4,$6,$7}' | tr -s ' ' ',' >>... (6 Replies)
Discussion started by: a1_win
6 Replies
8. Shell Programming and Scripting
hello gurus,
Somebody must have done this before, I couldn't find anything. Please redirect me if this was solved before, and if not please help.
To the problem now, I have multiple csv files (about 1000) which I need to concatenate by column header. The final file should have a superset... (4 Replies)
Discussion started by: abh.kumar
4 Replies
9. Shell Programming and Scripting
Hello,
I am processing a tab delimited text file and need to grab all of the column headers in an array.
The input looks like,
num Name PCA_A1 PCA_A2 PCA_A3
0 compound_00 -3.5054 -1.1207 -2.4372
1 compound_01 -2.2641 0.4287 ... (5 Replies)
Discussion started by: LMHmedchem
5 Replies
10. Shell Programming and Scripting
All,
I guess by this time someone asked this kind of question, but sorry I am unable to find after a deep search.
Here is my request
I have many files out of which 2 sample files provided below.
File-1 (with A,B as column headers)
A,B
1,2
File-2 (with C, D as column headers)
C,D
4,5
I... (7 Replies)
Discussion started by: ks_reddy
7 Replies
LEARN ABOUT DEBIAN
curses::widgets::listbox::multicolumn
Widgets::ListBox::MultiColumn(3pm) User Contributed Perl Documentation Widgets::ListBox::MultiColumn(3pm)
NAME
Curses::Widgets::ListBox::MultiColumn - Multi-Column List Box Widgets
MODULE VERSION
$Id: MultiColumn.pm,v 0.1 2002/11/14 01:28:49 corliss Exp corliss $
SYNOPSIS
use Curses::Widgets::ListBox::MultiColumn;
$lb = Curses::Widgets::ListBox::MultiColumn->new({
COLUMNS => [0, 5, 10, 3, 3],
LISTITEMS => [@list],
});
$lb->draw($mwh, 1);
See the Curses::Widgets pod for other methods.
REQUIREMENTS
Curses
Curses::Widgets
Curses::Widgets::ListBox
DESCRIPTION
Curses::Widgets::ListBox::MultiColumn is an extension of the standard Curses::Widgets::ListBox that allows a list of columns, with each
column a specified width.
METHODS
new (inherited from Curses::Widgets)
$tm = Curses::Widgets::ListBox->new({
COLUMNS => [0, 5, 10, 3, 3],
LISTITEMS => [@list],
HEADERS => [@headers],
HEADERCOLFG => 'white',
HEADERCOLBG => 'green',
BIGHEADER => 1,
});
All of the same key values apply here as they do for the parent class Curses::Widgets::ListBox. In addition, the following new keys are
defined:
Key Default Description
============================================================
COLUMNS [] Column widths
LISTITEMS [] List of list values
HEADERS [] Column header labels
HEADERFGCOL undef Header foreground colour
HEADERBGCOL undef Header background colour
BIGHEADER 0 Use more graphics for the header
KEYINDX 0 Index of key column
If headers are defined but one or both of the header colours are not, then they will default to the widget fore and background.
NOTE: Headers take up more lines in addition to the border (one line for the normal, small header, two lines for the larger). You need to
take that into account when setting the geometry. If no labels are passed in the HEADERS array, no space will be used for the headers.
The KEYINDX value is currently only used to match keystrokes against for quick navigation.
draw
$lb->draw($mwh, 1);
The draw method renders the list box in its current state. This requires a valid handle to a curses window in which it will render itself.
The optional second argument, if true, will cause the field's text cursor to be rendered as well.
HISTORY
1999/12/29 -- Original list box widget in functional model
2001/07/05 -- First incarnation in OO architecture
AUTHOR
/COPYRIGHT
(c) 2001 Arthur Corliss (corliss@digitalmages.com)
perl v5.8.8 2006-09-14 Widgets::ListBox::MultiColumn(3pm)