beqelessen Posted November 11, 2023 Share Posted November 11, 2023 Hi - I used MS-DOS way back in the day, and I've been a longtime Linux user, so I'm very comfortable with bash. I'm getting my head around SpartaDOS X and really loving its capabilities. (I just got DOSKEY loaded: yummy command history, aliases and more.) I'm wondering if Sparta DOS X supports append in its I/O redirection implementation. It doesn't seem to, as the traditional 'append' syntax is >>, but that's what's used in SDX to indicate 'write'. ( I guess because > is a valid path separator?) I tried >>>, but that didn't have any effect; as in, starting with a file named FILE.TXT containing "THIS", and running the following command, has no effect: ECHO THAT >>>FILE.TXT TYPE FILE.TXT THIS Going the whole hog and trying ECHO THAT >>>>FILE.TXT ....gave me 165 Bad filename And of course ECHO THAT >FILE.TXT ...just returns THAT >FILE.TXT The SpartaDOS X 4.49 User Guide doesn't shed any light though tantalizingly the Glossary gives the definition "Simply to add to. To append one file to another is to add the first onto the end of the second. This is often used when loading device handlers." 1 Quote Link to comment Share on other sites More sharing options...
_The Doctor__ Posted November 12, 2023 Share Posted November 12, 2023 (edited) redirect to which device ? D1: DA: D8: DO: ??? >> Not sure where your append is coming in... It's simply redirection of output. Does the file all ready exist and you are trying to append to the existing file? 4.1 APPEND - add destinations to system path Purpose Append the given drive and/or path at the end of the $PATH variable. Syntax APPEND d: | pathname | device Type External - on CAR: device. Availability As of SDX 4.40. Remarks Sometimes it is very handy to have the path variable changed temporarily. Especially while programming and/or administering your system equipped with mass storage devices like hard drives, flash cartridges, SIO2XX devices etc. The APPEND command facilitates the task of temporarily adding a device, drive or directory to the $PATH without manually rewriting all the paths that $PATH contains. Fig. 16: Append A Temporary Path and the appending of files or redirection of output as well TYPE README.DOC >>PRN: TYPE README.DOC >>D4:README2.DOC The COPY command may also be engaged to append files by using a '/A' immediately following (no space) the destination filespec. (SD 3.2 allows a '/A' when SAVEing any file to force append mode - SDX only supports this feature on the COPY command.) Concatenation (combining of files) can be performed during the copy process with the APPEND parameter '/A', which has to be placed at the end of the command sequence. COPY somefile.txt imafile.txt/A or add full paths etc. Edited November 12, 2023 by _The Doctor__ 1 Quote Link to comment Share on other sites More sharing options...
drac030 Posted November 12, 2023 Share Posted November 12, 2023 (edited) 17 hours ago, beqelessen said: I'm wondering if Sparta DOS X supports append in its I/O redirection implementation. No, it does not. But it can be done if needed. Edited November 12, 2023 by drac030 3 2 Quote Link to comment Share on other sites More sharing options...
beqelessen Posted November 14, 2023 Author Share Posted November 14, 2023 On 11/12/2023 at 3:05 AM, _The Doctor__ said: redirect to which device ? D1: DA: D8: DO: ??? >> Not sure where your append is coming in... It's simply redirection of output. Does the file all ready exist and you are trying to append to the existing file? 4.1 APPEND - add destinations to system path Purpose Append the given drive and/or path at the end of the $PATH variable. Syntax APPEND d: | pathname | device Type External - on CAR: device. Availability As of SDX 4.40. Remarks Sometimes it is very handy to have the path variable changed temporarily. Especially while programming and/or administering your system equipped with mass storage devices like hard drives, flash cartridges, SIO2XX devices etc. The APPEND command facilitates the task of temporarily adding a device, drive or directory to the $PATH without manually rewriting all the paths that $PATH contains. Fig. 16: Append A Temporary Path and the appending of files or redirection of output as well TYPE README.DOC >>PRN: TYPE README.DOC >>D4:README2.DOC The COPY command may also be engaged to append files by using a '/A' immediately following (no space) the destination filespec. (SD 3.2 allows a '/A' when SAVEing any file to force append mode - SDX only supports this feature on the COPY command.) Concatenation (combining of files) can be performed during the copy process with the APPEND parameter '/A', which has to be placed at the end of the command sequence. COPY somefile.txt imafile.txt/A or add full paths etc. Thanks @_The Doctor__! Yep, append is one of those overloaded terms. Thanks for finding all those usages. I do use the APPEND command to add paths to the environment variable $PATH for the duration of my session. What I'm talking about here is the other meaning, similar to the COPY command example you gave, but rather than concatenating two files, the data to be concatenated to an existing file is the output of a command. I'm not sure why you think the target device might matter? Curious to know why you mentioned that! Quote Link to comment Share on other sites More sharing options...
beqelessen Posted November 14, 2023 Author Share Posted November 14, 2023 On 11/12/2023 at 4:17 PM, drac030 said: No, it does not. But it can be done if needed. Thank you, @drac030! Not needed! I was just wondering if the feature existed. Looks like the COPY command's 'append' flag will do what I need. Hat tip to @_The Doctor__ for reminding me of that. 1 Quote Link to comment Share on other sites More sharing options...
drac030 Posted November 15, 2023 Share Posted November 15, 2023 On 11/12/2023 at 12:00 AM, beqelessen said: I tried >>>, but that didn't have any effect; In afterthought: ECHO THAT >>>FILE.TXT is the same as ECHO THAT >>\FILE.TXT i.e. the write should be done to a file named FILE.TXT and located in the main directory of the current drive. Just tried and this works so here. This leaves >>>> for the append mode, which perhaps will be available in the upcoming release. As about APPEND.COM: the Command Processor has evolved a bit since its appearance, so, if C:\BIN\ is to be added to PATH, then SET PATH=$PATH$;C:\BIN\ should work too. 3 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.