Skip to content

softwareupdate -l is not writing to "$ListOfSoftwareUpdates" #1

@sean-alex

Description

@sean-alex

In fw_softwareupdates_verification.sh, the command

/usr/sbin/softwareupdate -l 2>&1 > "$ListOfSoftwareUpdates"

does not write to "$ListOfSoftwareUpdates" (it does not list the software updates).

It may be due to an issue that spellcheck points out:
To redirect stdout+stderr, 2>&1 must be last (or use '{ cmd > file; } 2>&1' to clarify).
More details on the issue is found at https://github.com/koalaman/shellcheck/wiki/SC2069

Possible workaround: remove 2>&1 (i.e. /usr/sbin/softwareupdate -l > "$ListOfSoftwareUpdates" )

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