Skip to content

quoting issues in shell scripts #17

@ghost

Description

shellcheck result:

In intelmq-tutorial/ansible/files/reset-intelmq.sh line 5:
[ "root" != "$USER" ] && exec sudo $0 "$@"
                                   ^-- SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
[ "root" != "$USER" ] && exec sudo "$0" "$@"


In intelmq-tutorial/ansible/files/tutorial-to-html.sh line 5:
[ "user" != "$USER" ] && exec sudo -u user $0 "$@"
                                           ^-- SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
[ "user" != "$USER" ] && exec sudo -u user "$0" "$@"


In intelmq-tutorial/ansible/files/tutorial-to-html.sh line 9:
sudo chown $USER $DIR
           ^---^ SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
sudo chown "$USER" $DIR


In intelmq-tutorial/ansible/files/tutorial-update.sh line 5:
[ "user" != "$USER" ] && exec sudo -u user $0 "$@"
                                           ^-- SC2086: Double quote to prevent globbing and word splitting.

Did you mean: 
[ "user" != "$USER" ] && exec sudo -u user "$0" "$@"

For more information:
  https://www.shellcheck.net/wiki/SC2086 -- Double quote to prevent globbing ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions