15,897,891 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by Paul Hayman (Top 8 by date)
Paul Hayman
5-Jun-13 8:57am
View
Still no luck i'm afraid....
Creates a file with the following: 2 cells c:\tmp>C:\cygwin\bin\sort -t" " -k6,2 c:\tmp\test.csv 1>c:\tmp\test-sorted.csv"
Paul Hayman
5-Jun-13 8:00am
View
No Still get the error. arghhh I thought it woul dbe easy to sort a csv from command line.... I know it's windows but it's a work pc...
Paul Hayman
4-Jun-13 9:31am
View
OK Thanks so much, I think it's getting close but still not quite right:
C:\cygwin\bin\head -n 1 /cygdrive/c/tmp/CI-tosplit.csv && C:\cygwin\bin\tail -n +1 /cygdrive/c/tmp/CI-tosplit.csv | C:\cygwin\bin\sort -t',' -k5 /cygdrive/c/tmp/CI-tosplit.csv > c:\tmp\CI-DEN-sorted.csv
Gives error:
c:\tmp>C:\cygwin\bin\head -n 1 /cygdrive/c/tmp/CI-tosplit.csv && C:\cygwin\bin
\tail -n +1 /cygdrive/c/tmp/CI-tosplit.csv | C:\cygwin\bin\sort -t',' -k5 /cy
gdrive/c/tmp/CI-tosplit.csv 1>c:\tmp\CI-DEN-sorted.csv
fulfillment_line_item_id,groupon_number,order_date,merchant_sku_item,quantity_re
quested,shipment_method_requested,shipment_address_name,shipment_address_street,
shipment_address_street_2,shipment_address_city,shipment_address_stat,shipment_a
ddress_postal_code,shipment_address_country,gift,gift_message,quantity_shipped,s
hipment_carrier,shipment_method,shipment_tracking_number,ship_date,groupon_sku,c
ustom_field_value,permalink,item_name,vendor_id,salesforce_deal_option_id,groupo
n_cost,billing_address_name,billing_address_street,billing_address_city,billing_
address_stat,billing_address_postal_code,billing_address_country,purchase_order_
number,product_weight,product_weight_unit,product_length,product_width,product_h
eight,product_dimension_unit,customer_phone,incoterms,hts_code,3pl_name,3pl_ware
house_location,kitting_details,sell_price,deal_opportunity_id,shipment_strategy
/usr/bin/tail: write error
It's got the headers but not sure about the write error?? any Ideas?
Paul Hayman
4-Jun-13 9:10am
View
Ah ok I got it, but the header is now the footer lol....
Paul Hayman
4-Jun-13 8:34am
View
Sorry this is using windows:
'tail' is not recognized as an internal or external command,
operable program or batch file.
Paul Hayman
5-Mar-13 10:26am
View
Sorry:
When the script runs it prompts for the column to check and the column for the output as expected but if fills the column with zero's even though there are duplicates.
Paul Hayman
27-Feb-12 16:00pm
View
Hmm yeah I see your point. I thought it would be fairly straightforward to get the data into and array which I think i've done and then do a kind nested loop but I'm very new to PHP....
Paul Hayman
27-Feb-12 15:43pm
View
Thanks for the help, but I don't think group by is the answer. Doesn't this group the rows into one? I need separate lines with products not a summary.
Show More