Retourner au contenu associé (entrée de forum : hello world)
Posté par tontonflingueur le 13 février 2005 à 18:26. En réponse au message hello world. Évalué à 1.
#!/usr/local/bin/perl open (PIPE, "/sbin/ifconfig |"); while () { $ifconfig_result .= $_; } close PIPE; print $ifconfig_result;
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
# Adresse mac en perl
Posté par tontonflingueur . En réponse au message hello world. Évalué à 1.
#!/usr/local/bin/perl open (PIPE, "/sbin/ifconfig |"); while () { $ifconfig_result .= $_; } close PIPE; print $ifconfig_result;puis le parser pour récupérer l'adresse mac (pas très fiable ni très portable, mais ça marchera).