![]() |
|
|
google unix.com
|
|||||||
| Forums | S'inscrire | Forum Rules | Liens | Albums | FAQ | Liste des membres | Calendrier | Recherche | Aujourd'hui, les postes | Marquer les forums comme lus |
| De programmation et de script Shell Posez vos questions à propos de KSH, CSH, SH, BASH, PERL, PHP, SED, awk et d'autres scripts shell et les langages de script shell ici. |
Plus d'UNIX et Linux Forum Sujets Vous trouverez peut-être utile
|
||||
| Fil | Thread Starter | Forum | Réponses | Last Post |
| sed échapper char | fed.linuxgossip | De programmation et de script Shell | 2 | 10-04-2008 07:41 AM |
| Comment faire pour remplacer tous les caractères de nouvelle char. | mightysam | De programmation et de script Shell | 5 | 09-18-2008 09:15 PM |
| char c \u003d 882 | useless79 | High Level Programming | 1 | 07-30-2007 06:16 AM |
| char * p et p char []. | arunviswanath | High Level Programming | 4 | 07-20-2006 03:11 AM |
| \ n char en C | C | [anti-trust] | High Level Programming | 1 | 05-05-2005 07:15 PM |
![]() |
|
|
LinkBack | Thread Tools | Recherche sur ce Thread | Rate Thread | Modes d'affichage |
|
|
|
||||
|
Salut à tous, J'essaie de créer un script shell pour xiti le tag avait à la fin de servals pages Web, juste avant la balise <body/>. voici mon script: Code:
#!/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
et voici mon erreur :-( Code:
sed: -e expression #1, char 39: unterminated `s' command Merci d'avance pour votre aide |
|
||||
|
Merci pour votre réponse, mais il ne fonctionne pas :-(
j'ai essayé la ligne par ligne et i chose, cela est dû à (char. (que «pour quelque chose comme un macro) J'ai essayé avec \ (, mais le problème reste leur :-( |
|
||||
|
Merci pour votre aide, mon problème est résolu, voici le code:
Citation:
|
![]() |
| Bookmarks |
| Tags |
| sed xiti, shell script, shell scripting, scripts unix, unix scripts de base |
| Thread Tools | Recherche sur ce Thread |
| Modes d'affichage | Rate this thread |
|
|