10-27-2010
Quote:
Originally Posted by
Scrutinizer
...$1 need to be consecutive.
Hmm, you expect the input to be perfect ?
The "user" usually don't know that
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Friends,
Can any one help me with merging these file based on two columns :
File1:
A|123|99|SAMS
B|456|95|GEORGE
D|789|85|HOVARD
File2:
S|123|99|NANcY|6357
S|123|99|GREGRO|83748
A|456|95|HARRY|827|somers
S|456|95|ANTONY|546841|RUDOLPH|7263
B|456|95|SMITH|827|BOISE STATE|834... (3 Replies)
Discussion started by: sbasetty
3 Replies
2. Shell Programming and Scripting
Hi,
I want to merge the two files based on the key file's columns.
The key file:
DATE~DATE
HOUSE~IN_HOUSE
CUST~IN_CUST
PRODUCT~PRODUCT
ADDRESS~CUST_ADDR
BASIS_POINTS~BASIS_POINTS
...
The other 2 files are From_file & To_file -
The From_file:
DATE|date/time|29|9 ... (9 Replies)
Discussion started by: dips_ag
9 Replies
3. Shell Programming and Scripting
Hello Everyone,
I have two files I created in a format similar to the ones found below (character position is important):
File 1:
21 Cat Y N S Y Y N N
FOUR LEGS
TAIL
WHISKERS
30 Dog N N 1 Y Y N N
FOUR LEGS
TAIL
33 Fish Y N 1 Y Y N N
FINS
43 CAR Y N S Y Y N N
WHEELS
DOORS... (7 Replies)
Discussion started by: jl487
7 Replies
4. Shell Programming and Scripting
Hello Everyone,
I have two files, similar to the following:
File 1:
8010 ITEM01 CODE1 FLAG1
filler
filler
7020 OBJECT CODE2 FLAG2
filler
6010 THING1 CODE4 FLAG4
6011 ITEM20 CODE7 FLAG7
File 2 contains:
6020 ITEM01 CODEA FLAGA
filler
filler
filler
7000 OBJECT CODEB... (2 Replies)
Discussion started by: jl487
2 Replies
5. Shell Programming and Scripting
I've been a Unix admin for nearly 30 years and never learned AWK. I've seen several similar posts here, but haven't been able to adapt the answers to my situation. AWK is so damn cryptic! ;)
I have a single file with ~900 lines (CSV list). Each line starts with an ID, but with different stuff... (6 Replies)
Discussion started by: protosd
6 Replies
6. Shell Programming and Scripting
Hi,
I have a requirement to merge multiple lines based on search pattern. The search criteria is : it will search for CONSTRAINT and when it found CONSTRAINT, it will merge all lines to 1 line till it founds blank line.
For Example:
CREATE TABLE "AMS_DISTRIBUTOR_XREF"
(
"SOURCE"... (5 Replies)
Discussion started by: satyaatcgi
5 Replies
7. Shell Programming and Scripting
Hi,
trying to knock something together to create one line entries based on whether the first word on each line matches a particular value.
eg.
Link,"Name=""Something\something"","Timeout=""1800""",
"Target=""\\thing\thing\thing""","State=""ONLINE""",something,... (0 Replies)
Discussion started by: adamdb
0 Replies
8. Shell Programming and Scripting
I am trying to merge two lines to one based on some matching condition.
The file is as follows:
Matches filter:
'request ', timestamp, <HTTPFlow
request=<GET:
Matches filter:
'request ', timestamp, <HTTPFlow
request=<GET:
Matches filter:
'request ', timestamp, <HTTPFlow
... (8 Replies)
Discussion started by: jamie_123
8 Replies
9. UNIX for Dummies Questions & Answers
Hi, I am trying to selectively merge two files based on keys reported in the 1st column.
File1:
#file1-header1
file1-header2
111 qwe rtz uio
198 asd fgh jkl
165 yxc
789 poi uzt rew
89 lkj
File2:
#file2-header2
file2-header2
165 ghz nko2 ... (2 Replies)
Discussion started by: dovah
2 Replies
10. Shell Programming and Scripting
Hi,
I am struggling with the an awk command to merge two files based on a common key.
I want to append the value from File2 ($2) onto the end of File1 where $1 from each file matches - If no match then nothing is apended
File1
COL1|COL2|COL3|COL4|COL5|COL6|COL7... (3 Replies)
Discussion started by: Ads89
3 Replies
LEARN ABOUT DEBIAN
excel::template::element::cell
Excel::Template::Element::Cell(3pm) User Contributed Perl Documentation Excel::Template::Element::Cell(3pm)
NAME
Excel::Template::Element::Cell - Excel::Template::Element::Cell
PURPOSE
To actually write stuff to the worksheet
NODE NAME
CELL
INHERITANCE
ELEMENT
ATTRIBUTES
o TEXT
This is the text to write to the cell. This can either be text or a parameter with a dollar-sign in front of the parameter name.
o COL
Optionally, you can specify which column you want this cell to be in. It can be either a number (zero-based) or an offset. See
Excel::Template for more info on offset-based numbering.
o REF
Adds the current cell to the a list of cells that can be backreferenced. This is useful when the current cell needs to be referenced
by a formula. See BACKREF and RANGE.
o WIDTH
Sets the width of the column the cell is in. The last setting for a given column will win out.
o TYPE
This allows you to specify what write_*() method will be used. The default is to call write() and let Spreadsheet::WriteExcel make the
right call. However, you may wish to override it. Excel::Template will not do any form of validation on what you provide. You are
assumed to know what you're doing.
The legal types (taken from Spreadsheet::WriteExcel) are:
o COMMENT
Add a comment to the cell
o blank
o formula
o number
o string
o url
o date_time
other write_* methods as defined defined Spreadsheet::WriteExcel would be integrated by request
CHILDREN
FORMULA
EFFECTS
This will consume one column in the current row.
DEPENDENCIES
None
USAGE
<cell text="Some Text Here"/>
<cell>Some other text here</cell>
<cell text="$Param2"/>
<cell>Some <var name="Param"> text here</cell>
In the above example, four cells are written out. The first two have text hard-coded. The second two have variables. The third and fourth
items have another thing that should be noted. If you have text where you want a variable in the middle, you have to use the latter form.
Variables within parameters are the entire parameter's value.
Please see Spreadsheet::WriteExcel for what constitutes a legal formula.
AUTHOR
Rob Kinyon (rob.kinyon@gmail.com)
SEE ALSO
ROW, VAR, FORMULA
perl v5.14.2 2012-04-29 Excel::Template::Element::Cell(3pm)