Estoy buscando unas lineas en varios archivos y tratando de ordenarlas por una fecha (yyyymmdd) que está entre las columnas 72 y 78. El problema que tengo con el comando sort es que no le consigo ningun parametro para esto. Siempre trata de buscar un delimitador entre columnas y en mis archivos no hay.
I'm looking for some lines in several files and trying to sort them by a date (yyyymmdd) that is between columns 72 and 78. The problem that I'm having with the sort command is that I don't find any parameter for that. The command is trying to find a delimiter between columns and ther's none in my files.
Al final, este es el comando que funcionó:
In the end, this is the command that worked:
$ grep --no-filename ^00010316 Header* | sort -t@ --key=1.72,1.78
Se indica que el delimitador es @ (no hay ninguno en los archivos) y se ordena por la primera columna, en las posiciones entre la 72 y 78.
We indicate that the delimiter is @ (there's no one in the files) and we sort by the first column, between positions 72 and 78.
Suscribirse a Comentarios de la entrada [Atom]
Suscribirse a
Entradas [Atom]