I don't know whether it's possible, but I want to write shell scripts that act like regular executables with options. As a very simple example, consider a shell script foo.sh that is configured to be executable:
    ./foo.sh
    ./foo.sh -o
and the code foo.sh works like
    #!/bin/sh
    if  ## option -o is turned on
        ## do something
    else
        ## do something different
    endif
Is it possible and how to do that? Thanks.
 
     
     
     
     
    