Retourner au contenu associé (entrée de forum : Redirection de scripts)
Posté par totof2000 le 03 août 2004 à 16:44. En réponse au message Redirection de scripts. Évalué à 1.
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
[^] # Re: Take a cup of tee
Posté par totof2000 . En réponse au message Redirection de scripts. Évalué à 1.
J'ai pas de linux sous la main, peux-tu me dire si who -m fonctionne comme sous aix ?
#!/bin/ksh
# Identification du pseudo-terminal de sortie
SORTIE=/dev/$((who -m 2>/dev/null || echo "toto null") |awk '{ print 2ドル}')
echo $SORTIE
myexec() {
# Commande:
($* | tee titi.log>$SORTIE)2>&1 | tee error.log >$SORTIE
}
myexec ls - toto