![]() |
|
|
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 |
| sed escapar char | fed.linuxgossip | Programação Shell Script e | 2 | 10-04-2008 07:41 |
| Como substituir qualquer char com char newline. | mightysam | Programação Shell Script e | 5 | 09-18-2008 09:15 |
| char c \u003d 882 | useless79 | Alto Nível de programação | 1 | 07-30-2007 06:16 |
| char * p e char p []. | arunviswanath | Alto Nível de programação | 4 | 07-20-2006 03:11 |
| \ n char em C | C | [anti-trust] | Alto Nível de programação | 1 | 05-05-2005 07:15 |
![]() |
|
|
Linkback | Thread Tools | Pesquisar este Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Oi tudo, Tento criar um shell script que tinha a etiqueta xiti no final de páginas da web servals pouco antes da <body/> tag. aqui é o meu script: Código:
#!/bin/bash
##################################################################
rm -R /home/hibern/TEMP/hibern
cp -R /home/hibern/TEMP/hibernorig /home/hibern/TEMP/hibern
value=0
cat << EOF > /tmp/xiti.tmp
<!--\
Xt_param = 's=279747&p=';\
try {Xt_r = top.document.referrer;}\
catch(e) {Xt_r = document.referrer; }\
Xt_h = new Date();\
Xt_i = '<img width="39" height="25" border="0" alt="" ';\
Xt_i += 'src="http://logv33.xiti.com/hit.xiti?'+Xt_param;\
Xt_i += '&hl='+Xt_h.getHours()+'x'+Xt_h.getMinutes()+'x'+Xt_h.getSeconds();\
if(parseFloat(navigator.appVersion)>=4)\
{Xt_s=screen;Xt_i+='&r='+Xt_s.width+'x'+Xt_s.height+'x'+Xt_s.pixelDepth+'x'+Xt_s.colorDepth;}\
document.write(Xt_i+'&ref='+Xt_r.replace(/[<>"]/g, '').replace(/&/g, '$')+'" title="Internet Audience">');\
//-->\
</script>\
<noscript>\
Mesure d'audience ROI statistique webanalytics par <img width="39" height="25" src="http://logv33.xiti.com/hit.xiti?s=279747&p=" alt="WebAnalytics" />\
</noscript></a>\
EOF
for file in `find /home/hibern/TEMP/hibern -name '*.html' -print`
do
export m_tag=`cat /tmp/xiti.tmp`
sed -e 's/<body>/'$m_tag'/g' "$file" > "$file".tmp && mv -f "$file".tmp "$file"
done
e aqui está o meu erro :-( Código:
sed: -e expression #1, char 39: unterminated `s' command Agradecemos antecipadamente a sua ajuda |
|
||||
|
Obrigado pela vossa ajuda, o meu problema é resolvido, aqui está o código:
Citação:
|
![]() |
| Marcadores |
| Tags |
| sed xiti, shell script, shell script, unix script, unix script básico |
| Thread Tools | Pesquisar este Thread |
| Display Modes | Esta taxa Thread |
|
|