Re: how to write a program that takes arguments from commandline?



On Sun, 12 Feb 2006 15:23:41 +0100, in comp.lang.c , Martin Jørgensen
<unoder.spam@xxxxxxxxxxxx> wrote:

Keith Thompson wrote:

The arguments aren't necessarily space-separated; that depends on the
mechanism (for example, a shell) used to invoke your program.

If the arguments isn't space-separated, how else would they be separated?

colons, tabs, semicolons, slashes, any number of possibities.
Different OSes do different things.
Mark McIntyre
--
"Debugging is twice as hard as writing the code in the first place.
Therefore, if you write the code as cleverly as possible, you are,
by definition, not smart enough to debug it."
--Brian Kernighan

----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
.



Relevant Pages

  • Re: how to write a program that takes arguments from commandline?
    ... I assume argc contains the number of ... programs are often invoked from a shell ... Shells *can* use spaces to delimit arguments, ... like for constructing the arguments for the programs you invoke. ...
    (comp.lang.c)
  • Looking for a extensible shell for debug purpose
    ... process using IPC. ... Now I want to add a thread to this program to start shell, ... extensible shell, to enter command, then invoke the corresponding ... like lua, can embedded into the program, and by running lua script to ...
    (comp.os.linux.development.apps)
  • Re: (patch for Bash) arrayzip, arrayunzip
    ... > programming language". ... > writing shell code. ... considering that it's shell script vs. C. ...
    (comp.unix.shell)
  • Re: Finding out the active Unix shell
    ... I'm writing a C program that runs a Java program (an agent) ... The agent's shell is unknown, so I need to check, within my C code ... "Debugging is twice as hard as writing the code in the first place. ...
    (comp.lang.c)
  • Re: the de-facto way to "parse" input
    ... Hewlett-Packard Limited Cain Road, Bracknell, registered no: ... Essentially writing a mini-language for a shell is the same as writing a Basic interpreter, except expressions consist of pipes and globs and redirections more often than arithmetical operators. ...
    (comp.lang.c)