|
Home > Archive > Unix Shell > February 2005 > Interactive sorting
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Interactive sorting
|
|
| Peter Newman 2005-02-12, 5:49 pm |
| Are there any techniques to do this?
Ideally, suppose there was an interactive-sort command:
$ echo baz foo bar | interactive-sort
foo bar baz
Since the proper ordering of the tokens foo bar and baz is completely
subjective, interactive-sort would, somehow, get this information from
the user before it could proceed.
| |
| Chris F.A. Johnson 2005-02-12, 5:49 pm |
| On Sat, 12 Feb 2005 at 22:49 GMT, Peter Newman wrote:
> Are there any techniques to do this?
>
> Ideally, suppose there was an interactive-sort command:
>
> $ echo baz foo bar | interactive-sort
> foo bar baz
>
> Since the proper ordering of the tokens foo bar and baz is completely
> subjective, interactive-sort would, somehow, get this information from
> the user before it could proceed.
What type of information would it get from the user?
What would this do that you couldn't do with a text editor?
Or with arguments to sort? Or awk ......
--
Chris F.A. Johnson http://cfaj.freeshell.org/shell
========================================
===========================
My code (if any) in this post is copyright 2005, Chris F.A. Johnson
and may be copied under the terms of the GNU General Public License
| |
| Peter Newman 2005-02-12, 8:50 pm |
| Chris F.A. Johnson <cfajohnson@gmail.com> wrote:
> On Sat, 12 Feb 2005 at 22:49 GMT, Peter Newman wrote:
>
> What type of information would it get from the user?
>
> What would this do that you couldn't do with a text editor?
>
> Or with arguments to sort? Or awk ......
I think I should have said "hand-sorting". The task I had in mind was
making sure that a list of mp3s get written to a CD in the order I want.
Using a text editor sounds like a good idea. As long as the file names
are separated by newlines, they should be readable.
--
Peter Newman (panewman@uiuc.edu)
| |
| Bruce Barnett 2005-02-13, 7:48 am |
| Peter Newman <panewman@uiuc.edu> writes:
> I think I should have said "hand-sorting". The task I had in mind was
> making sure that a list of mp3s get written to a CD in the order I want.
If the number of items is small,....
Maybe you need something that gives you a list of items, with a number
in front, and you type the number to select that item and remove it
form the list.
An interative GUI with mouse/arrows would be handy.
I can't think of any off hand. Not my cuppa tee.
--
Sending unsolicited commercial e-mail to this account incurs a fee of
$500 per message, and acknowledges the legality of this contract.
| |
| Janis Papanagnou 2005-02-13, 7:48 am |
| Bruce Barnett wrote:
> Peter Newman <panewman@uiuc.edu> writes:
>
>
> If the number of items is small,....
>
> Maybe you need something that gives you a list of items, with a number
> in front, and you type the number to select that item and remove it
> form the list.
Ksh and bash have a selection command with item numbers...
set -- *.mp3 # whatever files you need
select sel in "$@"
do
print "You selected: ${sel}"
case "${sel}" in
*) do_whatever_with "${sel}" ;;
esac
done
> An interative GUI with mouse/arrows would be handy.
> I can't think of any off hand. Not my cuppa tee.
Janis
|
|
|
|
|