Valid Command Line Params...help!

Valid Command Line Params...help!

Post by Greg Fod » Wed, 22 Jan 1997 04:00:00



I recently wrote a simple program that searches a file for a string and replaces that string with another, as specified by command line parameters. The purpose of my program is to convert all my file:/// urls in my web pages to http:// urls before I upload them to the web server. My problem is when I try to pass an argument such as "file://C|" (with or without quotes, I've tried both ways), it doesn't work, because of the pipe. How can I pass a special character such as a > or a < or a | to a program in th
e form of a string? For now, I'm going to make the program read the parameters from a file, but I've very curious on how to do this, I can't find info on it anywhere..thanks

 
 
 

1. Help needed with command line params.

Hello fellow DJGPPers,

I would like to ask for some advice. How do you read the command-line
parameters given to a program at runtime, and copy them to strings?
Basically, I want to get the 2nd and 4th (given that the 1st is the
full pathname to the program) parameters into strings <2nd> and <4th>.
I realise that this is bloody simple, but I just seem to be bloody
stupid. Anyone out there who can give me a helping hand, plz? TIA.

                                                Piotr Sieklucki

2. .NET application on CD-ROM

3. %1286 == 1286th cmd line param, not %1 + "286"!?

4. USRobotics 2496: Character echo on power up?

5. Check command arg for valid filename

6. Zilog introduces new z80 family

7. command line to set lines=43

8. IBM1S506.ADD Problem

9. Take Command/32 for Nt4 -- are there any better command-line shells?

10. 4Dos command line question "for" command

11. Execute Multiple Commands on the same command line