![]() |
![]() |
#1 |
Posts: n/a
|
[AmigaDOS] How to pipe output to argument?
Hey, I'm using FS-UAE and I want to pipe some output into WHDLoad. I'm using the version of AmigaDOS that either comes with the Kickstart, or the emulator (AROS) I'm not sure.
Anyway, I unpacked the WHDLoad archive, and now I created my own start HD0:S/Startup-Sequence file, which executes when the emulator first starts. I also have a Workbench 3.1 directory thanks to Amiga Forever. What I want to do is pipe the output of the command: Code:
Dir "DH1:/#?.slave" Most of my commands have gotten the same error: Wrong number of arguments I'm really not familiar with AmigaDOS. Piping is very confusing compared to Linux or MS-DOS. Here is, for example, things that I have tried, and failed to get working: Code:
Dir DH1:/#?.slave TO WHDLoad Code:
Dir DH1:/#?.slave > slavename.txt WHDLoad < slavename.txt Code:
Copy PIPE:DH1:/#?.slave PIPE:WHDLoad |
![]() |
#2 |
Join Date: Jul 2008
Location: Sweden
Posts: 2,269
|
I don't think you want to pipe the output to the standard input of WHDLoad, but rather put the output on the command line as arguments to WHDLoad:
WHDLoad `Dir DH1:#?.slave` |
![]() |
![]() |
#3 |
Posts: n/a
|
Yes, that's exactly what I want to do. Except that the backticks do not work. I swear, is something wrong with the AmigaDOS I'm using, too? I wish I knew...
|
![]() |
#4 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 7,051
|
You have to use the right backticks (0x60).
And Dir is certainly not the right command because it does not include the path in its result. Use this instead: Code:
WHDLoad `list DH1:#?.slave lformat=%p%n` |
![]() |
![]() |
#5 |
Posts: n/a
|
Thanks for your help guys, your command worked fine in my Workbench install, but I think the way I'm doing it is not going to work out. I'm trying to save as many resources as possible. What I'm doing is copying over the List, Dir, and other commands from a Workbench 3.1 install to the extraced WHDLoad directory.
I have FS-UAE set up to use WHDLoad as the "hard drive", which works fine, but when I use the backticks or lformat, it wants me to use a ramdisk... Oh boy.... That means I have to write my own custom Startup-Sequence file. After commenting out a bunch of stuff, I tried this: Code:
C:MakeDir RAM:T RAM:ENV RAM:ENV/Sys Assign >NIL: ENV: RAM:ENV Assign >NIL: T: RAM:T ;Path >NIL: RAM: C: S: SetEnv Language "english" C:WHDLoad `List DH1:#?.Slave lformat=%p%n` EndCLI >NIL: Some people are saying too much memory is used, but I can't unallocate the memory when I need it, so I feel like I'm being shoved backwards from solving this problem. Darn. |
![]() |
#6 |
Posts: n/a
|
Oh... my gosh, it was because I needed to cd into DH1: for some reason... Wierd. Sorry. I added 8MB fast RAM too, just in case.
Here's a solution for someone who can download WHDLoad, and extract the archive, and can copy the List and Shutdown command (probably the AROS commands work fine too) they need to be copied in to WHDLoad/C, and then create the file WHDLoad/S/Startup-Sequence: Code:
; Custom Startup-Sequence C:MakeDir RAM:T RAM:ENV RAM:ENV/Sys Assign >NIL: ENV: RAM:ENV Assign >NIL: T: RAM:T SetEnv Language "english" DH1: C:WHDLoad `List #?.Slave lformat=%n` Shutdown Code:
hard_drive_0 = /path/to/folder/WHDLoad Code:
# Commodore Amiga A1200 regex/i/\.(ad[fz]|dms)$ Open=fs-uae --floppy_drive_0=%f directory/\(WHDLoad\)$ Edit=fs-uae --hard_drive_1=%f # Commodore Amiga CD32 regex/i/\(CD32\)\.cue$ Open=fs-uae --amiga_model=CD32 --cdrom_drive_0=%f Finally, since Shutdown will handle everything else, I have F10 to quit the game in my WHDLoad.prefs. You can change it. Code:
QuitKey=$59 ;rawkey code to quit Last edited by mrrhq; 11 May 2015 at 11:41. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Unable to type pipe and backslash characters | gryf | support.FS-UAE | 7 | 04 August 2015 23:47 |
Project: Blizzard 1230 IV - Heat Pipe Cooling System | Yoto | support.Hardware | 45 | 17 December 2012 05:45 |
Amiga, vfork(), and pipe() | tygre | Coders. General | 5 | 03 December 2011 01:35 |
Pipe Dream (original) | MethodGit | request.Old Rare Games | 3 | 16 December 2010 22:17 |
Pipe Mania - AGA-fixed/1-filed by Galahad | MethodGit | request.Old Rare Games | 10 | 28 May 2009 01:34 |
|
|