02-24-2009
ok, here's my example data
|02/23/09|06:56PM|3|Plaza Cafe|Plaza2| | |VISA/MC Student | | |Y| | 7.50
|02/23/09|07:05PM|3|C/Ventana |Vent#2| | |VISA/MC Student | | |Y| | 15.77
|02/23/09|07:07PM|3|Plaza Cafe|Plaza2| | |VISA/MC Staff | | |Y| | 7.49
|02/23/09|07:15PM|3|FoodWorx10|Worx#2| | |VISA/MC Student | | |Y| | 4.50
|02/23/09|07:18PM|3|SierraSum |West 2| | |VISA/MC Student | | |Y| | 11.90
|02/23/09|07:28PM|1|Earl's |E/PSou| | |VISA/MC Student | | |Y| | 2.84
|02/23/09|07:42PM|4|Oceanview |OVT #1| | |VISA/MC Student | | |Y| | 12.20
sort -t"|" -k6 test.data > test.data1
|02/23/09|07:28PM|1|Earl's |E/PSou| | |VISA/MC Student | | |Y| | 2.84
|02/23/09|07:42PM|4|Oceanview |OVT #1| | |VISA/MC Student | | |Y| | 12.20
|02/23/09|07:07PM|3|Plaza Cafe|Plaza2| | |VISA/MC Staff | | |Y| | 7.49
|02/23/09|06:56PM|3|Plaza Cafe|Plaza2| | |VISA/MC Student | | |Y| | 7.50
|02/23/09|07:05PM|3|C/Ventana |Vent#2| | |VISA/MC Student | | |Y| | 15.77
|02/23/09|07:18PM|3|SierraSum |West 2| | |VISA/MC Student | | |Y| | 11.90
|02/23/09|07:15PM|3|FoodWorx10|Worx#2| | |VISA/MC Student | | |Y| | 4.50
perfect, now add second key
sort -t "|" -k6 -k3n test.data > test.data2
|02/23/09|07:28PM|1|Earl's |E/PSou| | |VISA/MC Student | | |Y| | 2.84
|02/23/09|07:42PM|4|Oceanview |OVT #1| | |VISA/MC Student | | |Y| | 12.20
|02/23/09|07:07PM|3|Plaza Cafe|Plaza2| | |VISA/MC Staff | | |Y| | 7.49
|02/23/09|06:56PM|3|Plaza Cafe|Plaza2| | |VISA/MC Student | | |Y| | 7.50
|02/23/09|07:05PM|3|C/Ventana |Vent#2| | |VISA/MC Student | | |Y| | 15.77
|02/23/09|07:18PM|3|SierraSum |West 2| | |VISA/MC Student | | |Y| | 11.90
|02/23/09|07:15PM|3|FoodWorx10|Worx#2| | |VISA/MC Student | | |Y| | 4.50
Doesn't seem to be responding to -k3...I've tried -k3 -k3n -k3.1,2 -k3.1,2n
TIA!!!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
M 47 HIS:LOT 32 DUTY 2 MIKE, FINISHED
MIKE ACTIVE STATUS
23TASK YES GOOD
100TASK NO GOOD
========================================
M 47 HIS:LOT 1 DUTY 1 MIKE, FINISHED
MIKE ACTIVE STATUS
23TASK YES GOOD
... (7 Replies)
Discussion started by: bobo
7 Replies
2. UNIX for Dummies Questions & Answers
Hello all,
I have a test file that has the format:
.....
O
3.694950 -.895050 1.480000
O
5.485050 .895050 1.480000
Ti
-4.590000 4.590000 2.960000
Ti
-2.295000 ... (5 Replies)
Discussion started by: aarondesk
5 Replies
3. UNIX for Dummies Questions & Answers
I'm looking for a sort command that will sort by zip code first then by last name. (zip code is the last field, last name is first field)
data file looks like this.
Hope Bob 1234 Main ST. Colorado Springs, CO 80920
I was thinking along the lines of:
sort -k9n address.data //for the... (2 Replies)
Discussion started by: ssgatbliss
2 Replies
4. UNIX for Dummies Questions & Answers
I was trying to check for the sort of some columns (say 1-10) of particular file. Now, by default, the Unix sort uses as a separator whitespace (e.g. if you have 'foo bar' then it separates it into 'foo' and 'bar' to use as keys)
Now, I know which particular columns I want to use as the sort... (1 Reply)
Discussion started by: rev.meister
1 Replies
5. Shell Programming and Scripting
Hi all.
Is there a way that I can use the sort command too sort the following field by earliest time (12:00AM) to latest time (11:59PM)?
07:12PM
07:53PM
07:54PM
08:07PM
10:15AM
10:21AM
TIA!!!!!! (1 Reply)
Discussion started by: lyoncc
1 Replies
6. Shell Programming and Scripting
Hello,
I have a large data file:
1234 8888 bbb
2745 8888 bbb
9489 8888 bbb
1234 8888 aaa
4838 8888 aaa
3977 8888 aaa
I need to remove duplicate lines (where the first column is the duplicate). I have been using:
sort file.txt | uniq -w4 > newfile.txt
However, it seems to keep the... (11 Replies)
Discussion started by: palex
11 Replies
7. Shell Programming and Scripting
Hi Guys,
I have a file to be sorted and uniq with the following format.
S00001002|01|20021231
S00001002|01|20011031
S00001006|01|20120430
S00001006|01|20111231
S00001006|01|20111031
S00001006|01|20110831
S00001006|01|20110731
S00001006|01|20101231
S00001006|01|20091231... (5 Replies)
Discussion started by: nua7
5 Replies
8. UNIX for Dummies Questions & Answers
I have a file like this:
/vol/eng_app_0103z
/vol/eng_app_0103z
/vol/eng_app_0120z
/vol/eng_app_0126z
/vol/eng_app_0144z
/vol/eng_app_0150z
/vol/eng_app_0154z
/vol/eng_app_01551z
/vol/eng_app_01552z
/vol/eng_app_0155z
/vol/eng_app_0164z
/vol/eng_app_0199zWhen I use the sort command... (3 Replies)
Discussion started by: newbie2010
3 Replies
9. Shell Programming and Scripting
I have a question about what the sort command is doing.
Here is some sample data:
348201310013RVE 2
600201310013GFJ 70
3302013020101NS 40
600201309013GFJ 70
The sort command that is running is as follows:
sort -k 1,3 -k 12,4 input.txt > output.txt
... (6 Replies)
Discussion started by: Drenhead
6 Replies
10. UNIX for Beginners Questions & Answers
Have a text file containing 4 columns, the 4th column is sorted numerically in descending order. The 2nd column is alpha text. Been able to get the 4th column to sort in descending order. The 2nd column sorts correctly but it's also in reverse. Would like to be able to keep the 4th column sort... (8 Replies)
Discussion started by: jimmyf
8 Replies
LEARN ABOUT DEBIAN
business::onlinepayment::ippay
IPPay(3pm) User Contributed Perl Documentation IPPay(3pm)
NAME
Business::OnlinePayment::IPPay - IPPay backend for Business::OnlinePayment
SYNOPSIS
use Business::OnlinePayment;
my $tx =
new Business::OnlinePayment( "IPPay",
'default_Origin' => 'PHONE ORDER',
);
$tx->content(
type => 'VISA',
login => 'testdrive',
password => '', #password
action => 'Normal Authorization',
description => 'Business::OnlinePayment test',
amount => '49.95',
customer_id => 'tfb',
name => 'Tofu Beast',
address => '123 Anystreet',
city => 'Anywhere',
state => 'UT',
zip => '84058',
card_number => '4007000000027',
expiration => '09/02',
cvv2 => '1234', #optional
);
$tx->submit();
if($tx->is_success()) {
print "Card processed successfully: ".$tx->authorization."
";
} else {
print "Card was rejected: ".$tx->error_message."
";
}
SUPPORTED TRANSACTION TYPES
CC, Visa, MasterCard, American Express, Discover
Content required: type, login, action, amount, card_number, expiration.
Check
Content required: type, login, action, amount, name, account_number, routing_code.
DESCRIPTION
For detailed information see Business::OnlinePayment.
METHODS AND FUNCTIONS
See Business::OnlinePayment for the complete list. The following methods either override the methods in Business::OnlinePayment or provide
additional functions.
result_code
Returns the response error code.
error_message
Returns the response error description text.
server_response
Returns the complete response from the server.
Handling of content(%content) data:
action
The following actions are valid
normal authorization
authorization only
post authorization
credit
void
Setting IPPay parameters from content(%content)
The following rules are applied to map data to IPPay parameters from content(%content):
# param => $content{<key>}
TransactionType => 'TransactionType',
TerminalID => 'login',
TransactionID => 'order_number',
RoutingCode => 'RoutingCode',
Approval => 'authorization',
BatchID => 'BatchID',
Origin => 'Origin',
Password => 'password',
OrderNumber => 'invoice_number',
CardNum => 'card_number',
CVV2 => 'cvv2',
Issue => 'issue_number',
CardExpMonth => ( $month ), # MM from MM(-)YY(YY) of 'expiration'
CardExpYear => ( $year ), # YY from MM(-)YY(YY) of 'expiration'
CardStartMonth => ( $month ), # MM from MM(-)YY(YY) of 'card_start'
CardStartYear => ( $year ), # YY from MM(-)YY(YY) of 'card_start'
Track1 => 'track1',
Track2 => 'track2',
ACH
AccountNumber => 'account_number',
ABA => 'routing_code',
CheckNumber => 'check_number',
CardName => 'name',
DispositionType => 'DispositionType',
TotalAmount => 'amount' reformatted into cents
FeeAmount => 'FeeAmount',
TaxAmount => 'TaxAmount',
BillingAddress => 'address',
BillingCity => 'city',
BillingStateProv => 'state',
BillingPostalCode => 'zip',
BillingCountry => 'country', # forced to ISO-3166-alpha-3
BillingPhone => 'phone',
Email => 'email',
UserIPAddr => 'customer_ip',
UserHost => 'UserHost',
UDField1 => 'UDField1',
UDField2 => 'UDField2',
UDField3 => 'UDField3',
ActionCode => 'ActionCode',
IndustryInfo
Type => 'IndustryInfo',
ShippingInfo
CustomerPO => 'CustomerPO',
ShippingMethod => 'ShippingMethod',
ShippingName => 'ship_name',
ShippingAddr
Address => 'ship_address',
City => 'ship_city',
StateProv => 'ship_state',
Country => 'ship_country', # forced to ISO-3166-alpha-3
Phone => 'ship_phone',
NOTE
COMPATIBILITY
Debian version 0.06-2 (upstream version 0.07) changes the server name and path for IPPay's late 2012 update.
Business::OnlinePayment::IPPay uses IPPay XML Product Specifications version 1.1.2.
See http://www.ippay.com/ for more information.
AUTHOR
Jeff Finucane, ippay@weasellips.com
SEE ALSO
perl(1). Business::OnlinePayment.
perl v5.14.2 2012-10-30 IPPay(3pm)