|
Sort Unique Sortu Utility SourcesThe sortu program is a replacement for the sort and uniq programs. It is common for Unix script writers to want to count how many separate patterns are in a file. For example, if you have a list of addresses, you may want to see how many are from each state. So you cut out the state part, sort these, and then pass them through uniq -c. Sortu does all this for you in a fraction of the time. Sortu uses a hash table and some decent line processing to provide this functionality. For a relatively small number of keys, it can be signifcantly smaller than using sort, because it does not have to keep temporary files. If you are dealing with a large number of unique keys then sortu will run out of memory and stop. Sortu has some basic field and delimiter handling which should do most basic awk or cut features to separate out the field that you are sorting on. ArgumentsTo list all of the available options, use 'sortu --usage'.
RepositoryThe newest versions of the program are available via the web: http://256stuff.com/sources/sortu/ LicensePermission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
Copyright 2020 Gray Watson. |