Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

DOS utility to display 1st line of all files in directory? (Users)

posted by Rugxulo Homepage, Usono, 03.01.2013, 10:55

> But, I'd still like to get Rugxulo's BAT file up and running, as it seems
> to be a much more elegant way to accomplish the same task.

Sorry, been busy and distracted, never had enough energy or time to fully reply. (Not sure I do now either, sorry.)

The long answer is that it always depends on what you're trying to do and how you want to do it. "There is more than one way to skin a cat", as they say. I'm not sure what to tell you, esp. since even the QBASIC way is less universal and portable and kinda kludgy.

For simple text manipulation, you're better off using an appropriate scripting language or standard tool, e.g. awk, sed, rexx, head, tail, etc. While QBASIC has its virtues, esp. being pre-installed in (most common) MS-DOS setups, it's not necessarily the easiest, cleanest, most portable, or most robust (and easy to use) tool, at least in this case.

Part of the appeal of suggesting QBASIC (though lacking easy access to cmdline args) was so you wouldn't have to download anything extra. But it would be easier (in the long run) to just read up on Sed and AWK or similar. That way your work will work on any platform that supports those (DOS, OS/2, Win, *nix, Mac). And the fact that they are pretty small doesn't hurt either (even if it is a minor extra hassle to download them).

 

Complete thread:

Back to the forum
Board view  Mix view
22762 Postings in 2122 Threads, 402 registered users (0 online)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum