FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 03-22-2008, 08:18 PM
"Amadeus W.M."
 
Default sort with tab field separator

You would think specifying tab as a field separator for sort would work
like this:

cat file | sort -k 3 -t " "

It doesn't:

sort: multi-character tab ` '


So after a little search and some trial and error I got this to work:

cat file | sort -k 3 -t "`/bin/echo -e ' '`"


For my own curiosity, can someone please illuminate me as to why the
first incantation does not work as expected? Is there a more natural way
to specify other than echo?

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 03-22-2008, 08:38 PM
Nicholas Robinson
 
Default sort with tab field separator

On Saturday 22 March 2008 21:18:11 Amadeus W.M. wrote:
> You would think specifying tab as a field separator for sort would work
> like this:
>
> cat file | sort -k 3 -t " "
>
> It doesn't:
>
> sort: multi-character tab ` '
>
>
> So after a little search and some trial and error I got this to work:
>
> cat file | sort -k 3 -t "`/bin/echo -e ' '`"
>
>
> For my own curiosity, can someone please illuminate me as to why the
> first incantation does not work as expected? Is there a more natural way
> to specify other than echo?

Take the double quotes out in your first attempt. So command becomes

cat file | sort -k 3 -t

Nick

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 

Thread Tools




All times are GMT. The time now is 09:45 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org