Skip to content

NSH I/O redirection and I/O operation doesn't work and incomplete #2454

Description

@acassis

This issue was reported by @casaroli and I'm just reporting here to avoid forgetting about it.

Works: ">"

nsh> ls / > /tmp/files.txt

nsh> cat /tmp/files.txt
/:
bin/
dev/
etc/
proc/
tmp/
nsh>

Works: ">>"

nsh> ls /dev >> /tmp/files.txt

nsh> cat /tmp/files.txt
/:
bin/
dev/
etc/
proc/
tmp/
/dev:
console
gpio0
gpio1
gpio2
gpio3
loop
null
oneshot
ram0
ram1
ram2
zero
nsh>

Doesn't work: "<"

nsh> cat < /tmp/files.txt
nsh: cat: open failed: 2
nsh>

Doesn't work: "|"

nsh> cat /tmp/files.txt | cat
/:
bin/
dev/
etc/
proc/
tmp/
nsh: cat: open failed: 2
nsh>

Doesn't work: "2>"

nsh> cat /tmp/doesexist.txt 2> /tmp/error.txt
nsh: cat: open failed: 2
nsh> ls -l /tmp
/tmp:
-rw-rw-rw- 122 files.txt
nsh>

Activity

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

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