Skip to content

SC3028 with busybox shell: "In dash, RANDOM is not supported." #3285

@airtower-luna

Description

@airtower-luna

For bugs with existing features

Here's a snippet or screenshot that shows the problem:

# shellcheck shell=busybox
echo "$RANDOM"

Here's what shellcheck currently says:

[Line 2:](javascript:setPosition(2, 7))
echo "$RANDOM"
      ^-- [SC3028](https://www.shellcheck.net/wiki/SC3028) (error): In dash, RANDOM is not supported.

Here's what I wanted or expected to see:

No error. Busybox ash supports RANDOM, example output:

# echo $RANDOM
14948
# echo $RANDOM
11702

The mention of "dash" in the output indicates the shell type isn't handled correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions