Skip to content

Reading value to update variable with from stdin instead of datafile #272

@RomanValov

Description

@RomanValov

Sometimes it's desirable to avoid creating temporary files on disk just to feed them to efivar later:

$ echo -ne 'data\0' | iconv -t ucs2 > ./var.bin
$ sudo efivar -w --name=... --datafile=./var.bin

I've tried using /dev/stdin and /proc/self/fd/0 but neither worked:

$ echo -ne 'data\0' | iconv -t ucs2 | sudo efivar -w --name=... --datafile=/dev/stdin
Could not use "/dev/stdin": Invalid argument
$ echo -ne 'data\0' | iconv -t ucs2 | sudo efivar -w --name=... --datafile=/proc/self/fd/0
Could not use "/proc/self/fd/0": Invalid argument

Please fix the usage or provide alternative syntax like:

$ echo -ne 'data\0' | iconv -t ucs2 | sudo efivar -w --name=... --datafile=-

P.S.: efibootmgr supports feeding arguments via stdin with -@ - .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No 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