Reducing the number of parameters entered on the command line for Signature Scanner

You may need to scan numerous times using the same values for some or all of the parameters. To make this procedure easier, use the alias command in Linux and Mac OS X or the DOSKEY utility in Windows to reduce the number of parameters you must enter on the command line.

To reduce the number of parameters in Linux and Mac OS X:

Create an alias that runs Signature Scanner and specifies those parameters that will not change.

  1. Open a terminal window and optionally, go to the directory where Signature Scanner is installed.

  2. Create an alias. The alias command has the following syntax:

    alias <AliasName>="<PathToCommand> --<Parameter1> <Value1> --<Parameter2> <Value2>...--<ParameterN> <ValueN>"

    The following example contains all required parameter excluding the <scan path> value and password:

    alias HubScan="./scan.cli.sh --host hostName --port 80 --username sysadmin  --project projectName --release releaseNumber"
  3. Run the alias command.

    AliasName --<RemainingParameter1> <Value 1>... --<RemainingParameterN> <ValueN>

    The following example runs the alias command with the password and path to the file directory specified:

    HubScan /path/to/file/to/scan --password passwordValue

To reduce the number of parameters in Windows:

Use the DOSKEY utility to create a macro that executes Signature Scanner.

  1. Open a command prompt and optionally go to the directory where Signature Scanner is installed.

  2. Create the macro. DOSKEY has the following syntax:

    DOSKEY <Macro_Name>=<path to command> -<Parameter1> <Value1> -<Parameter2> <Value2>...-<ParameterN> <ValueN>$*

    The following example contains all required parameter excluding the <scan path> value and password:

    DOSKEY HubScan=scan.cli.bat -host hostName -port 80 -username sysadmin -project projectName -release releaseNumber $*
    Note: DOSKEY must have $* at the end in order to specify additional parameters when the macro is called.
  3. Run the DOSKEY command.

    DOSKEYName -<RemainingParameter1> <Value1>... -<RemainingParameterN> <ValueN>

    The following example runs the DOSKEY command with the password and path to the file directory specified:

    HubScan /path/to/file/to/scan -password passwordValue