[linux-l] Datum in Script verwenden

Nico Golde nion at gmx.net
Di Apr 10 11:32:33 CEST 2007


Hallo Benjamin,

* Benjamin Schieder <blindcoder at scavenger.homeip.net> [2007-04-10 11:24]:
> On 07.04.2007 19:57:41, Nico Golde wrote:
> > Und? Was hast du erwartet, wenn du das durch eine Pipe 
> > schickst? Egal hier meine sh-kompatible Version:
> > $ echo 456 | {
> > > foo=123
> > >  while read line; do
> > > foo=$line
> > > done;}
> > $ echo $foo
> > 456
> 
> Man kann natuerlich auch
> 
> 	foo=123
> 	mkfifo /tmp/foo
> 	echo 456 > /tmp/foo& 
> 	while read line; do
> 		foo=$line
> 	done < /tmp/foo
> 	rm -f /tmp/foo
> 	echo $foo
> 
> machen. Es stellt sich halt immer die Frage nach Lesbarkeit und Einfachkeit.

Was an der ursprünglichen Fragen vorbei ginge... Dein 
Bashism ist wohl auch nicht lesbarer und einfacher, auch 
wenn das zugegeben vom Auge des Betrachters abhängt.
Gruß Nico
-- 
Nico Golde - http://ngolde.de - nion at jabber.ccc.de - GPG: 0x73647CFF
For security reasons, all text in this mail is double-rot13 encrypted.
-------------- nächster Teil --------------
Ein Dateianhang mit Binärdaten wurde abgetrennt...
Dateiname   : nicht verfügbar
Dateityp    : application/pgp-signature
Dateigröße  : 189 bytes
Beschreibung: nicht verfügbar
URL         : <https://mlists.in-berlin.de/pipermail/linux-l-mlists.in-berlin.de/attachments/20070410/0a9ce19a/attachment.sig>


Mehr Informationen über die Mailingliste linux-l