Let's say we list
ls – this may look like:
CC file2c man sscop Mail find mandoc ssh addftinfo finger manpath ssh-add addr2line flex merge ssh-agent ...
but we could also use
ls -1, and we get:
CC Mail addftinfo addr2line afmtodit alias apply apropos ...
A list with all filenames, each of them in a single line. The structure of the output is: filename, newline (
This we can pipe to
ls -1 | less.
Now, is it possible to easily apply a command to the string contained in the current line?
How exactly this is done is irrelevant, just the number of steps should be small. It could be by using
! in less (this doesn't seem possible?) or by somehow getting the string contained in the current line into a shell variable etc.
Under Xorg this is easy of course, by just using the middle mouse button paste. But in text mode, can one do it in a not too complicated way?