Skip to content

Model detection not working #1

Description

@JoKneeMo

MODEL=$(grep -o "Raspberry Pi [0-9]" /proc/device-tree/model)

This command fails because of the null characters returned in this particular file.
Error message: grep: /proc/device-tree/model: binary file matches

Add the -a flag to grep to treat the file as text.

MODEL=$(grep -oa "Raspberry Pi [0-9]" /proc/device-tree/model)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions