Tapatalk

What is Start Field in Advanced Sort Options?

What is Start Field in Advanced Sort Options?

31
NewbieNewbie
31

PostFeb 05, 2025#1

I'm looking at the Advanced Sort Options in UE for Linux, version 2023.0.0.21. What is "Start Field" that's shown for each of the four Keys?
Advanced Sort Options.jpg (42.89KiB)
Advanced sort options in UEX 2023.0.0.21

6,824625
Grand MasterGrand Master
6,824625

PostFeb 05, 2025#2

Please read the UltraEdit Wiki page Advanced sort / options. These options are for sorting CSV files with comma, semicolon, horizontal tab, vertical bar or another characters as delimiter between the values of the fields (=data columns) in each row (=line), i.e. for a table sort. Expand also the Options to enable table sort.

There can be read also the documentation for the GNU Coreutils sort as that utility is used by UltraEdit for the sort.

There should be read also the UltraEdit blog Master UltraEdit: Sorting .csv and delimited text data by specific columns and fields

There are further on YouTube the UltraEdit/UEStudio tutorial videos:
  1. Sort files by line or column in UltraEdit text editor UltraEdit
  2. Sort CSV text by field with UltraEdit text editor

31
NewbieNewbie
31

PostFeb 05, 2025#3

Thanks for the quick response.
I had seen the Advanced sort / options page, but it doesn't mention the Start or End Fields. Your answer also implies that the delimiter character can be defined, but I guess I'll just have to play with it.
Here's what I'm after:
I have an HTML file with each line in a list being an artist and song title. I want to sort by artist, which begins after the opening <li> and before the first hyphen

Code: Select all

    <li>King Crimson - 21st Century Schizoid Man  (07:21)</li>
    <li>Gary Clark Jr - Ain't Messin' Round (04:09)</li>
    <li>Jeff Beck - Ambitious (Album Version) (04:37)</li>
    <li>Rush - Anthem (04:26)</li>
    <li>Grand Funk Railroad - Are You Ready (03:28)</li>
    <li>Chris Rea - Auberge (06:20)</li>
    <li>Frank Marino - Babylon Revisited (05:24)</li>
    <li>Ronnie Earl &amp; The Broadcasters - Backstroke (04:19)</li>
    <li>Rush - Bastille Day (04:40)</li>
The file has 727 items, thus the hopes for a way to use UE's sorting power.

6,824625
Grand MasterGrand Master
6,824625

PostFeb 06, 2025#4

The wanted sort does not require a table sort. There can be used a simple line sort with start column 1 and end column -1 which means sort by entire lines.

The sort options for a simple lines sort with UltraEdit for Windows:
I do not have UltraEdit for Linux.
sort_options_for_simple_lines_sort.webp (3.84KiB)
UltraEdit for Windows sort options for a simple lines sort

The result of the simple lines sort is:

Code: Select all

    <li>Chris Rea - Auberge (06:20)</li>
    <li>Frank Marino - Babylon Revisited (05:24)</li>
    <li>Gary Clark Jr - Ain't Messin' Round (04:09)</li>
    <li>Grand Funk Railroad - Are You Ready (03:28)</li>
    <li>Jeff Beck - Ambitious (Album Version) (04:37)</li>
    <li>King Crimson - 21st Century Schizoid Man  (07:21)</li>
    <li>Ronnie Earl &amp; The Broadcasters - Backstroke (04:19)</li>
    <li>Rush - Anthem (04:26)</li>
    <li>Rush - Bastille Day (04:40)</li>
The delimiter for a table sort can be specified in the Advanced Sort/Options dialog window of UltraEdit for Windows on checking the option Custom delimited sort which results in displaying an edit field to enter the delimiter character.
sort_options_for_table_sort_with_hyphen.webp (4.04KiB)
UltraEdit for Windows sort options for a table sort with hyphen as delimiter

The result of this table sort is:

Code: Select all

   <li>King Crimson - 21st Century Schizoid Man  (07:21)</li>
    <li>Gary Clark Jr - Ain't Messin' Round (04:09)</li>
    <li>Jeff Beck - Ambitious (Album Version) (04:37)</li>
    <li>Rush - Anthem (04:26)</li>
    <li>Grand Funk Railroad - Are You Ready (03:28)</li>
    <li>Chris Rea - Auberge (06:20)</li>
    <li>Frank Marino - Babylon Revisited (05:24)</li>
    <li>Ronnie Earl &amp; The Broadcasters - Backstroke (04:19)</li>
    <li>Rush - Bastille Day (04:40)</li>
The lines are sorted according to the song title after the hyphen and the following space character.

31
NewbieNewbie
31

PostFeb 06, 2025#5

Once again, I made things 100x more complicated than it really was. That simple line sort achieved what I was after. But your demonstrating that there actually is a field - right in front of my eyes - to specify that delimiter made it all the more interesting. Thanks again, it's been very enlightening (mostly a self-revelation ;-) )

So based on your second solution, sorting by song title, the Start Field is the integer order of a delimited line, with the first field being before the first delimiter. Very interesting, and very powerful.
If you're interested, here's what UE Linux's complete options dialog looks like:
AdvancedSortOptions.png (44.24KiB)