Welcome, Guest. Please login or register.

Author Topic: Pipe AmigaDOS command into shell?  (Read 3239 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline LoadWBTopic starter

  • Hero Member
  • *****
  • Join Date: Jul 2006
  • Posts: 2901
  • Country: 00
    • Show all replies
Pipe AmigaDOS command into shell?
« 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?
 

Offline LoadWBTopic starter

  • Hero Member
  • *****
  • Join Date: Jul 2006
  • Posts: 2901
  • Country: 00
    • Show all replies
Re: Pipe AmigaDOS command into shell?
« Reply #1 on: September 03, 2006, 11:31:11 PM »
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.
 

Offline LoadWBTopic starter

  • Hero Member
  • *****
  • Join Date: Jul 2006
  • Posts: 2901
  • Country: 00
    • Show all replies
Re: Pipe AmigaDOS command into shell?
« Reply #2 on: September 04, 2006, 03:18:36 AM »
Quote

Piru wrote:

Try by launching a new shell, and then:
1.> echo "echo foo*Necho bar" | execute in:


Works like a charm.  Thanks!