![]() |
Olá e boas-vindas de Estados Unidos para o UNIX e Linux Forum! Obrigado por visitar e fazer parte da nossa comunidade global.
|
|
google unix.com
|
|||||||
| Fóruns | Registar | Fórum Regimento | Ligações | Álbuns | FAQ | Lista deputados | Calendário | Pesquisa | Today's Posts | Mark Forums Read |
| Programação Shell Script e Post perguntas sobre ksh, CSH, SH, BASH, Perl, PHP, SED, Awk e outros scripts shell e shell scripts línguas aqui. |
Mais UNIX e Linux Fórum Tópicos Você pode achar Helpfull
|
||||
| Fio | Thread Starter | Fórum | Respostas | Última postagem |
| arquivo comparação script | tiger99 | Programação Shell Script e | 1 | 01-30-2008 10:47 |
| Problema no ksh script (String comparação) | amarnath | AIX | 1 | 07-18-2006 06:40 |
| Problema no ksh script (String comparação) | amarnath | Programação Shell Script e | 3 | 07-13-2006 12:14 |
| Ajuda com o tempo comparação script para HP-UX | gummysweets | Programação Shell Script e | 6 | 10-12-2005 10:48 |
| Instalando Patches de um script | viRaven | Programação Shell Script e | 3 | 12-12-2003 12:52 |
|
|
Linkback | Thread Tools | Pesquisar este Thread | Rate Thread | Display Modes |
|
||||
|
Comparação de 2 de domingo servidor patches usando script
Oi,
Não sei o que estou em falta, tentou debug, mas não foi bem sucedida, qualquer ajuda sobre isso será muito apreciada. Código:
#!/bin/sh
rm -f /tmp/t?
host1=`cat $1|grep Hostname: | awk '{print $2}'`
host2=`cat $2|grep Hostname: | awk '{print $2}'`
rel1=`cat $1|grep Release: | awk '{print $2}'`
rel2=`cat $2|grep Release: | awk '{print $2}'`
arch1=`cat $1|grep "Kernel architecture:" | awk '{print $3}'`
arch2=`cat $2|grep "Kernel architecture:" | awk '{print $3}'`
cat $1 |grep "Patch:" | awk '{print $2}' >/tmp/t1
cat $2 |grep "Patch:" | awk '{print $2}' >/tmp/t2
cat /tmp/t1 | awk '{print $1}'| sort >/tmp/t3
cat /tmp/t2 | awk '{print $1}'| sort >/tmp/t4
prev=`head -1 t3`
for i in `cat t3`
do
curr=$i
if [ $prev != $curr ]
then
currhead=`echo $curr | cut -f 1 -d "-"`
prevhead=`echo $prev | cut -f 1 -d "-"`
if [ $prevhead != $currhead ]
then
echo $prev >> /tmp/ta
fi
prev=$curr
fi
done
rm /tmp/t?
$. / Patchscript + Rm-f / tmp / t? + Gato + Grep Hostname: + Awk (print $ 2) Última edição por DukeNuke2; em 03/21/2009 12:53.. |
| Marcadores |
| Thread Tools | Pesquisar este Thread |
| Display Modes | Esta taxa Thread |
|
|