Running an ADEdit script as an executable from the command line

You can run an ADEdit script without invoking ADEdit first by making the script an executable file.

To run an ADEdit script as a UNIX-executable file:

  1. Verify the script begins with the following lines:
    #!/bin/env adedit
    package require ade_lib

    The script reads it as a comment, however UNIX or Linux will use it to find and execute ADEdit and then execute the rest of the script.

  2. Use chmod to make the file executable.

    For example, if the name of the script is my_adedit_scipt and it is the current working directory, type:

    chmod +x my_adedit_script
  3. Make sure the file’s directory is listed in your PATH environment variable if you want to be able to execute the file from any directory.

    Alternatively, modify the script to include the full path to adedit. For example:

    #!/bin/env /usr/bin/adedit

    Once set up this way, you can simply enter the script’s file name in a shell and have the script execute as a command.