[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: BTW (wie) kann ein (ba)sh Skript von IO lesen?



Hallo!

Robert Michel wrote:

> Aber BTW, kann ein (ba)sh skipt von IO lesen?

wolf@denkbrett:~ $ cat /tmp/test.sh 
#!/bin/sh

while read line; do
        echo input: $line
done
wolf@thinkpad:~ $ echo foobar | /tmp/test.sh
input: foobar
wolf@thinkpad:~ $ /tmp/test.sh
asdf<enter>
input: asdf
asdfasdf<enter>
input: asdfasdf
<Ctrl+D>
wolf@thinkpad:~ $ 

hth, Wolf
-- 
Büroschimpfwort des Tages: Windowsversteher - für "Sysads" oder ähnliche 
Nerds, die außer Computer nix können. (Frank Nietsch)



Reply to: