Shell argv

JB sundown at pacifier.com
Mon May 8 13:47:10 EDT 2017


Here is the code;

#include<stdio.h>

int main (int argc, char *argv[])
{
    if (argc < 2)
        printf ("You didn't enter any arguments.\n");
    else
        printf ("Your argument at position 1 is: %s\n", argv[1]);
    
    printf ("\nYour file path is:\n%s\n\n", argv[0]);
    
    return 0;
}

JB




More information about the use-livecode mailing list