ericsonneLe 14/02/2008 à 21:20
bonsoir ,
j'ai fais une récupération par awk:
#!/bin/sh
f1=/etc/printers.conf140208
f2=/etc/printers.suivi
tmp=/tmp/tmp_printers
(cat $f1 |awk -F":" '{print $1}' $f1) > $tmp
mv -f $tmp $f2
je recupère maintenant que le nom des imprimantes,
dans mon fichier $f2
j'ai le nom des imprimantes : PNC4 PNC4Psc
j'ai un autre problème comment je fais pour récupérer
l'ip des l'imprimante dans le /etc/hosts avec mon fichier de récupération $f2
exemple de /etc/host:
10.140.80.6 PNC4 PNC4Psc