how to

how to sort a file with a tab delimiter
eg
bed 234
room 123

sort by price

try this

sort +1 filename

thank you but i think i wrote the questin wrong
there is a tab space btw bed and the price

then also it should work

i thought to but it did not

then post some lines of your input file as it is..
or try this

sort  +1 -n filename

bed 12
sofa 1876
lamp 456

sort by price

bed 12345
sofa 15
lamp 555

sorry i missed -n option
sort +1 -n filename

ok what about from highest to lowest

sort +1 -n -r filename

i would assume we use the -r option

ok so we dont have to use the -t option with the delimiter \t

lets say we have a set of columns and i need to sort but the is a tab delimiter

didn't get you..

ok like if there is a delim : we use sort -t: to sort with a delim of a semi colon but why cant we use sort -t\t for the tab ones
b

in sort command The default field separator is a sequence of one or more consecutive blank characters.that includes tab so no need to use -t option

ok thank you
so much