Re: uso de sort
En linux existe una cosa llamada manual, que se invoca con el comando: "man".
Si hubieras hecho "man sort" y hubieras leido el manual (RTFM), hubieras encontrado esto:
-t separator
Use character separator as the field separator when finding the
sort keys in each line. By default, fields are separated by the
empty string between a non-whitespace character and a whitespace
character. That is to say, given the input line ` foo bar',
sort breaks it into fields ` foo' and ` bar'. The field separa-
tor is not considered to be part of either the field preceding
or the field following it.
uso de sort
Colapsar
X
-
uso de sort
Buenas, os muestro con un more le contenido del fichero borra.
Bien, me gustaría ordenar este fichero o bien por el campo1, op por el campo 2 ... dependiendo del momento. Para hacerlo, estoy utilizando el comando "sort",pero no entiendo por que siempre me hace la misma ordenacion. MAs abajo tambien os pongo el resultado
ayuda please
# more borra
3,true,10,10,"CBPSAX-4500",false,false,"V11.01.C04"
1,true,10,10,"ACPSAX2300-2",false,false,"V11.01.C04"
2,true,10,10,"VDPSAX-1250",false,false,"V10.00.C07"
# sort +1 borra
1,true,10,10,"ACPSAX2300-2",false,false,"V11.01.C04"
2,true,10,10,"VDPSAX-1250",false,false,"V10.00.C07"
3,true,10,10,"CBPSAX-4500",false,false,"V11.01.C04"
# sort +0 borra
1,true,10,10,"ACPSAX2300-2",false,false,"V11.01.C04"
2,true,10,10,"VDPSAX-1250",false,false,"V10.00.C07"
3,true,10,10,"CBPSAX-4500",false,false,"V11.01.C04"
# sort +2 borra
1,true,10,10,"ACPSAX2300-2",false,false,"V11.01.C04"
2,true,10,10,"VDPSAX-1250",false,false,"V10.00.C07"
3,true,10,10,"CBPSAX-4500",false,false,"V11.01.C04"
# sort +5 borra
1,true,10,10,"ACPSAX2300-2",false,false,"V11.01.C04"
2,true,10,10,"VDPSAX-1250",false,false,"V10.00.C07"
3,true,10,10,"CBPSAX-4500",false,false,"V11.01.C04"Etiquetas: Ninguno

Dejar un comentario: