QDOS and Toolkit II syntax

Helpful tips and guides, also new users can ask for help here.
Post Reply
lowrybt
Chuggy Microdrive
Posts: 70
Joined: Wed Apr 16, 2014 4:56 pm

QDOS and Toolkit II syntax

Post by lowrybt »

Hello,
Two novice queries....

1. Is there a command for redirecting calls to flpX_ to flpY_?

2. Is there a command or routine in QDOS that facilities finding and replacing specific code in basic files? For example, find and replace all instances of, say, PROG_USE?

Thanks, Tom


User avatar
NormanDunbar
Forum Moderator
Posts: 2251
Joined: Tue Dec 14, 2010 9:04 am
Location: Leeds, West Yorkshire, UK
Contact:

Re: QDOS and Toolkit II syntax

Post by NormanDunbar »

Hi Tom,

A1. Not that I am aware of, sorry.

A2. Do you have the C68 installation? If not, get it from Dilwyn's fine web site. Once you have it you can "redirect" flp1_ to flp2_ as follows:

Code: Select all

ex win1_c68_sed; '-g s/flp1_/flp2_/ input_file_name >output_file_name'
The docs for C68 explain all the options available in SED. For the substitute command, s, it is s/existing_text/replacement_text/. Output is normally to the screen hence the need to redirect to a desired output file. The input file will not be changed.

Alternatively, any text editor such as QED has the ability to search and replace.


HTH

Cheers,
Norm.


Why do they put lightning conductors on churches?
Author of Arduino Software Internals
Author of Arduino Interrupts

No longer on Twitter, find me on https://mastodon.scot/@NormanDunbar.
User avatar
ql_freak
Gold Card
Posts: 353
Joined: Sun Jan 18, 2015 1:29 am

Re: QDOS and Toolkit II syntax

Post by ql_freak »

lowrybt wrote:1. Is there a command for redirecting calls to flpX_ to flpY_?
Unfortunately AFAIK not. You can redirect MDV to e.g. FLP (MDV_USE, there is also FLP_USE and WIN_USE, and ...), but not the numbers (every directory device driver supports up to 8 drives).

But there is the REDIRECT device from Phil Borman which allows to redirect files to other files (similar as symbolic links in Unix). You can find it as redir.zip on Dilwyns Software Download page, look for redir.zip. Other useful device driver from Phil is the PTH device which allows a search path (similar as PATH on Windows, UNIX, ...) for files. Last but not least, if you have (I think) QPac2 (or of course QPC2) there should be the DEV device, which allows redirections.


http://peter-sulzer.bplaced.net
GERMAN! QL-Download page also available in English: GETLINE$() function, UNIX-like "ls" command, improved DIY-Toolkit function EDLINE$ - All with source. AND a good Python 3 Tutorial (German) for Win/UNIX :-)
Post Reply