Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 20 Dec 2014, 01:56
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
Problem with sorting script - two column sort (Solved)
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 2 [20 Posts]   Goto page: Previous 1, 2
Author Message
ally


Joined: 19 May 2012
Posts: 884
Location: lincoln

PostPosted: Mon 21 Apr 2014, 18:38    Post subject:  

mirrored here:

http://archive.org/details/Puppy_Linux_Small_Business_Pup

Smile
Back to top
View user's profile Send private message Visit poster's website 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11180
Location: Arizona USA

PostPosted: Mon 21 Apr 2014, 21:34    Post subject:  

Hansol and musher0, you two ought to collaborate on a thread about an Enterprise Puppy in the How-to section of the forum. Smile
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4457
Location: Gatineau (Qc), Canada

PostPosted: Tue 22 Apr 2014, 03:33    Post subject:  

Flash wrote:
Hansol and musher0, you two ought to collaborate on a thread about an Enterprise Puppy in the How-to section of the forum. Smile


Thanks for the thought, Flash.

Indeed, it would certainly be very good to have hansol and his expertise on board.
For the last couple of days, Eric (e_mattis) and I have started to exchange seed ideas
about a new SOHO Puppy, through PM.

Maybe considering an "Enterprise Puppy" is a bit ambitious at this point, but with
like-minded people working together in some sort of loose team structure, who knows,
anything's possible.

BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
Karl Godt


Joined: 20 Jun 2010
Posts: 3982
Location: Kiel,Germany

PostPosted: Fri 25 Apr 2014, 10:14    Post subject:  

hansol wrote:
Musher,

Thanks very much! That certainly got it sorted out. I'm staring at your code trying to figure out "why" it works, and can't quite grasp it, but all I care about is that it does indeed work! Very Happy

You saved me hours of googling, so thanks again.


First :
Your code had two times the -k switch
The -k switch is commonly used together with the -t switch :
Code:
LIST="101  A
101  B
101  C
102  A
102  B
102  C
103  A
103  B
103  C"

sortDELIMITER=" "

echo "$LIST" | sort -k2 -t"$sortDELIMITER"
101  A
102  A
103  A
101  B
102  B
103  B
101  C
102  C
103  C


And be aware that Puppies might use the busybox sort applet instead of the binary :

Code:
LIST="101  A                             
101  b
101  C
102  A
102  b
102  C
103  a
103  B
103  c"

echo "$LIST" | sort -k2 -t"$sortDELIMITER"
103  a
101  A
102  A
101  b
102  b
103  B
103  c
101  C
102  C

echo "$LIST" | busybox sort -k2 -t"$sortDELIMITER"
101  A
102  A
103  B
101  C
102  C
103  a
101  b
102  b
103  c
Back to top
View user's profile Send private message Visit poster's website 
disciple

Joined: 20 May 2006
Posts: 6464
Location: Auckland, New Zealand

PostPosted: Wed 18 Jun 2014, 18:56    Post subject:  

Interesting thread.
Hansol, you might also want to check out pdfshuffler and pdfsam if you haven't already. And one day you might find Kingsoft Office or perhaps Softmaker Office saves you from Wine Smile

_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 2 [20 Posts]   Goto page: Previous 1, 2
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0560s ][ Queries: 11 (0.0051s) ][ GZIP on ]