Amiga.org
Amiga computer related discussion => General chat about Amiga topics => Topic started by: LoadWB on September 03, 2006, 09:34:14 PM
-
In the Unix world, we enjoy such constructs as
{command to generate list of commands} | sh
In AmigaDOS, we have to
{command to generate list of commands} > t:tempfile
execute t:tempfile
For instance, trying to convert a bunch of DMS files to ADF, I used this command
list dms all files p=#? lformat "dms write %p%n to rad: nopause *n transadf drive rad: file adf/%p%m.ADF" > t:transdms
execute t:transdms
When what I would really like to do is something like
list lformat "{command}" | shell
How could I accomplish this?
-
- Grab Pipe-1.5.lha (http://www.aminet.net/package.php?package=util/shell/Pipe-1.5.lha)
- Unarchive
- Copy Pipe/Pipe to c:
- add 'Resident ADD C:Pipe PURE' to user-startup if you have the system resources.
- edit shell-startup, and add
set _pchar "|"
set _mchar "&&"
- Make sure you have PIPE: mounted. If it's in Storage/DosDrivers, doubleclick it. If you want it permanent, drag the PIPE icon to Devs/DosDrivers.
Try by launching a new shell, and then:
1.> echo "echo foo*Necho bar" | execute in:
Read Pipe.doc for full documentation.
-
Thank ya! I'll have to check what version of PIPE I'm running now. I have pchar and mchar set -- found that a long time ago, and it's great with Unix tools like grep, awk, etc.
-
@LoadWb
I know how you feel. Unix is the best and it's good to have a part of it on your AmigaDOS. You might want to check CShell as well.
-
If you are using AmigaOS 4 this works out of the box.
-
Piru wrote:
Try by launching a new shell, and then:
1.> echo "echo foo*Necho bar" | execute in:
Works like a charm. Thanks!