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



Mark McIntyre <markmcintyre@xxxxxxxxxxx> wrote:

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.

In fact, there's nothing in the Standard that requires the contents of
argv to come from a command line. One could have an implementation on an
all-WIMP environment that pops up a little dialog with an extensible
list of text entry fields each time a program is run.

Richard
.



Relevant Pages

  • Re: Im looking for "Virtual dummy shell" in linux?
    ... > I'm looking for this kind of shell. ... > be invoked and reuturn some result to user according to command user issued. ... > 2) but don't influence to real root file system and system environment. ... since a shell is used to invoke commands (ie executable ...
    (comp.os.linux.development.system)
  • Re: find with -exec option using complex expressions
    ... "find -exec" does not invoke a shell unless you explicitly give a command ... --AP news story ...
    (comp.unix.shell)
  • Re: xp_cmdshell
    ... Just create a regular batch file, save it in the root dir and invoke ... line shell you invoke when you go to Start> Run and enter cmd. ... >> invokes a new instance of of the command line shell, ...
    (microsoft.public.sqlserver.programming)
  • Re: X problem as root
    ... You have to export the variable XAUTHORITY before invoke su ... do not use the '-' in su command because this invoke the shell which read the ...
    (Debian-User)
  • Re: How to clear history of commands in unix
    ... This will tell you how to invoke your shell. ... May be I am not deleting the proper history file. ... Look at the man page of your shell to find out about command history. ...
    (comp.unix.admin)