PreviousUpNext

5.2.14  Commandline Arguments

The argv function returns the Linux commandline arguments with which the script was invoked. Thus, this script implements a poor man’s version of the Linux echo program:

    #!/usr/bin/mythryl
    apply (printf " %s") (argv());
    print "\n";
    exit 0;

When run it prints out the arguments it was given:

    linux$ ./my-script a b c
     a b c

Comments and suggestions to: bugs@mythryl.org

PreviousUpNext