Method 2 (recommended): Write a shell script and wrap the command

This method writes a shell script and wraps the command that was run in it. This method is safer and does not open /bin/shell in the allowlist.

As an example of wildcards:

  1. Write a custom_grep.sh script. For example:
    user_arg=$1
    grep $user_arg
  2. Add custom_grep.sh to the allowlist and restart the Host Server.
  3. In the Remote Commands tool, run this command:
    /home/user/custom_grep.sh exec /opt/cloverleaf/cis20.1/*/tclprocs/*.tcl

    As a pipes example, write a piping.sh:

    user_arg1=$1
    user_arg2=$2
    /bin/bash -c "$1 | $2"
  4. Add it to the allowlist.
  5. Restart the Host Server
  6. Run it in Remote Commands:
    /opt/cis20.1/integrator/usercmds/piping.sh "ls -l $HCIROOT" "grep hello"