Skip to content

Use more quotes in bash scripts (give ShellCheck a try) #12

@namgo

Description

@namgo

More of a suggestion than a clear critique:

ShellCheck (https://github.com/koalaman/shellcheck) is super helpful to catch small errors in bash code, as I mentioned via slack, I highly recommend running it over the project.

It integrates with most editors if you're interested in that.

It mostly helped me find some issues in your code where you should be encapsulating variables with " quotes, and that there are a few unused variables.

For example, the following I believe should be encapsulated with quotes around variables:

https://github.com/4rnaudB/spinalcord-signal-recovery/blob/2a63e5a8fa01b0062fb0e6f176706bc49ea7a754/scripts/experiment_script/run_experiment.sh#L77C1-L77C73

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions