Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
STDerror in pipe umleiten; Wie?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
Westerwaelder
n00b
n00b


Joined: 04 Dec 2003
Posts: 3
Location: Westerwald

PostPosted: Fri Dec 05, 2003 7:12 am    Post subject: STDerror in pipe umleiten; Wie? Reply with quote

Hallo Forum,

unter
https://forums.gentoo.org/viewtopic.php?t=42522&highlight=liste+schnell
gibt es ein schöne Anleitung um sein Gentoo ohne Internetanbindung aktuell zu halten.
Ich habe nun versucht das mal alles in einem Script zu einer Pipe zusammenzufassen.
Also so ähnlich wie folgende Zeile (die so nicht funktioniert!):

emerge -uf world 2> | sed -e 's/ .*//g' | sed -e 's/^.*\//http:\/\/ftp.uni-erlangen.de\/pub\/mirrors\/gentoo\/distfiles\//g' > liste.schnell

Aber irgendwie bekomme ich den stderror kanal nicht in die pipe.
Wenn ich emerge -uf world 2>&1 schreibe, hab ich beide Kanäle in der Pipe.
Aber das will ich nicht.

Frage an die bash profis; wie stell ich es an?

Gruß Markus
Back to top
View user's profile Send private message
MaJor_PerMutation
n00b
n00b


Joined: 23 Jul 2003
Posts: 61

PostPosted: Fri Dec 05, 2003 10:50 am    Post subject: Reply with quote

Vielleicht hilft dir der

Advanced Bash-Scripting Guide

weiter.

Viel Erfolg!
Back to top
View user's profile Send private message
Westerwaelder
n00b
n00b


Joined: 04 Dec 2003
Posts: 3
Location: Westerwald

PostPosted: Fri Dec 05, 2003 11:07 am    Post subject: Reply with quote

MaJor_PerMutation wrote:
Vielleicht hilft dir der

Advanced Bash-Scripting Guide

weiter.


Leider nicht. Im Kapitel 16 wird im Zusammenhang mit der pipe für stderr nichts geschrieben. Nur die Umleitung mit > oder < wird ausführlich behandelt.

Gruß,
Markus
Back to top
View user's profile Send private message
ruth
Retired Dev
Retired Dev


Joined: 07 Sep 2003
Posts: 640
Location: M / AN / BY / GER

PostPosted: Fri Dec 05, 2003 11:38 am    Post subject: Reply with quote

moin,
so:
Code:

emerge -upf world 2>&1 1> /dev/null | grep _blah


hihi,
du kannst auch STDIN und STDOUT umdrehen...
Code:

emerge -blah 3>&2 2>&1 1>&3-


AABBBEERR:
in diesem thread ist eine schönes perl script... ;-)
versuch mal das...

gruss
rootshell
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum