Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 7d586073 authored by Josh Gao's avatar Josh Gao
Browse files

adb: shell: add -n flag to not read from stdin.

Shell scripts of the following form do not work properly with adb:
    echo "foo\nbar\nbaz" | {
        read FOO
        while [ "$FOO" != "" ]; do
            adb shell echo $FOO
            read FOO
        done
    }
The first run of adb shell will consume all of the contents of stdin,
causing the loop to immediately end. ssh solves this by providing a -n
flag that causes it to not read from stdin. This commit adds the same.

Bug: http://b/25817224
Change-Id: Id74ca62ef520bcf03678b50f4bf203916fd81038
parent 79cfba55
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment