sjl@ecs.OZ (Stephen Lamb) (05/06/86)
I have tried the following command to print directories and it doesn't seem to work. Has anyone got a solution (even a software substitute) to this problem ? The command is 'dir lib10: opt a to prt:' ,and the response is 'bad arguments' and consequently no redirection occurs. Thanks in advance, Stephen Lamb, ACSnet :sjl@ecs.OZ
randy@cbmvax.UUCP (05/06/86)
In article <147@ecs.OZ> sjl@ecs.OZ (Stephen Lamb) writes: > >I have tried the following command to print directories and it doesn't >seem to work. > >The command is 'dir lib10: opt a to prt:' ,and the response is >'bad arguments' and consequently no redirection occurs. > AmigaDos uses a syntax similar to UNIX for IO redirection. The 'dir' command defaults output to stdout. The correct format is: dir >prt: lib10: opt a In general, the output redirection '>name' is placed immediately after the DOS command. -- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Randy Weiner -- Commodore Business Machines <<Amiga Technical Support>> uucp: {ihnp4|seismo|caip}!cbmvax!randy arpa: cbmvax!randy@seismo.css.GOV (or) randy@cbmvax.UUCP@{seismo | harvard} TEL: 215-431-9180
bruceb@amiga.UUCP (Bruce Barrett) (05/06/86)
In article <147@ecs.OZ> sjl@ecs.OZ (Stephen Lamb) writes: > >I have tried...'dir lib10: opt a to prt:' ,and the response is >'bad arguments' ... > >Thanks in advance, > > Stephen Lamb, > > ACSnet :sjl@ecs.OZ Stephen, This is a common request for people without the AmigaDOS manuals. The way to find out what is going on is to type: DIR ? The response is: DIR,OPT/K: _ This means that DIR takes 2 arguments, neither is required (/A), the second must have the "OPT" keywork in addition to the value you want to assign to OPT (/K). The options for DIR are A (for all) and I (for interactive). There is no way to determine this from the "DIR,OPT/K: _" help line. Redirection is done BEFORE any other other parameters. So... what you want is: DIR >prt: LIB10: opt a This is "so easy" to do it does make one wonder why some commands (like TYPE) have a "TO" parameter. Must be TO confuse Austrailians :-). To redirect input and output use: foo <input >output p1 p2 p3 or foo >output <input p1 p2 p3 --Bruce Barrett
sjl@ecs.OZ (Stephen Lamb) (05/12/86)
To all those who replied to my plea for help regarding printing the directory, THANKS! I have replied to most where posible, but the return path of some was M~O~N~S~T~E~R~O~U~S.....and our machine doesn't seem to want to know them, hence the reason for posting it here. I know have a couple of command formats that work. sjl@ecs.oz