Hi,
I need to sort a file from a start character position to an end character position within record, eg:
sort using a key specified as character positions 5-12 within the record
Can this be achieved with the Unix sort command? The entire record should be regarded as one field irrespective of embedded blanks (ie sort should not attempt to split my record into fields based on existing blanks!). I'm afraid that:
sort -k 1.5,1.12 infile
may not work ok
anyone already faced this issue and able to share a tested solution? Thanks
I need to sort a file from a start character position to an end character position within record, eg:
sort using a key specified as character positions 5-12 within the record
Can this be achieved with the Unix sort command? The entire record should be regarded as one field irrespective of embedded blanks (ie sort should not attempt to split my record into fields based on existing blanks!). I'm afraid that:
sort -k 1.5,1.12 infile
may not work ok
anyone already faced this issue and able to share a tested solution? Thanks