PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > What is wrong with this printf?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

What is wrong with this printf?

Réponse
 
LinkBack Outils de la discussion
Vieux 21/07/2007, 09h30   #1
osiris@abydos.kmt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut What is wrong with this printf?

URL="http://www.google.com"
printf "%s%s%s%s\n" ' <a href="' "$URL" '">' "${URL}</a><p>"

The above printf prints the tag properly in the email it is sending
but then when the email is read and the weblink is clicked,
Thunderbird slides down a pane with:

External Protocol Request
An external application must be launched to handle ttp: links.
Requested link:

ttp://www.google.com"

Application: <Unknown>
...

Two characters are somehow not getting submitted properly.
So why is Thunderbird (or any other mail client) not seeing the '"h' ???

Thanks for any .

  Réponse avec citation
Vieux 21/07/2007, 14h04   #2
Bill Marcum
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: What is wrong with this printf?

On Sat, 21 Jul 2007 08:30:13 GMT, osiris@abydos.kmt
<osiris@abydos.kmt> wrote:
>
>
> URL="http://www.google.com"
> printf "%s%s%s%s\n" ' <a href="' "$URL" '">' "${URL}</a><p>"
>
> The above printf prints the tag properly in the email it is sending
> but then when the email is read and the weblink is clicked,
> Thunderbird slides down a pane with:
>
> External Protocol Request
> An external application must be launched to handle ttp: links.
> Requested link:
>
> ttp://www.google.com"
>
> Application: <Unknown>
> ...
>
> Two characters are somehow not getting submitted properly.
> So why is Thunderbird (or any other mail client) not seeing the '"h' ???
>
> Thanks for any .
>

I don't know, but in a printf command the constant information is
usually written in the format string, followed by variables,like
printf ' <a href="%s">%s</a><p>\n' "$URL" "$URL"


--
It takes two to tell the truth: one to speak and one to hear.
  Réponse avec citation
Vieux 23/07/2007, 01h57   #3
osiris@abydos.kmt
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: What is wrong with this printf?


osiris@abydos.kmt wrote:
>
>URL="http://www.google.com"
>printf "%s%s%s%s\n" ' <a href="' "$URL" '">' "${URL}</a><p>"
>
>The above printf prints the tag properly in the email it is sending
>but then when the email is read and the weblink is clicked,
>Thunderbird slides down a pane with:
>
> External Protocol Request
> An external application must be launched to handle ttp: links.
> Requested link:
>
> ttp://www.google.com"
>
> Application: <Unknown>
> ...
>
>Two characters are somehow not getting submitted properly.
>So why is Thunderbird (or any other mail client) not seeing the '"h' ???
>
>Thanks for any .


So, it turns out that the problem was apparently some bug
in Thunderbird concerning the HTML. The only reason that
I am using HTML at all is because I have four-column output.
Unfortunately, HTML doesn't seem to be the solution either
since some of my users still read their mail with Eudora
which doesn't *appear* to display html mail (I may be wrong on that).

Thus, considering the age-old problem of displaying columns
in email clients using proportional fonts, do I have any other option
for creating columns that could line up the data?

Thanks.
  Réponse avec citation
Vieux 23/07/2007, 04h25   #4
Icarus Sparry
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: What is wrong with this printf?

On Mon, 23 Jul 2007 00:57:10 +0000, osiris wrote:

> osiris@abydos.kmt wrote:


>
> So, it turns out that the problem was apparently some bug in Thunderbird
> concerning the HTML. The only reason that I am using HTML at all is
> because I have four-column output. Unfortunately, HTML doesn't seem to
> be the solution either since some of my users still read their mail with
> Eudora which doesn't *appear* to display html mail (I may be wrong on
> that).
>
> Thus, considering the age-old problem of displaying columns in email
> clients using proportional fonts, do I have any other option for
> creating columns that could line up the data?


Tab characters, or decide that columns and proportional fonts are a bad
mixture.
  Réponse avec citation
Vieux 24/07/2007, 19h36   #5
Stephane CHAZELAS
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: What is wrong with this printf?

2007-07-23, 00:57(+00), osiris@abydos.kmt:
[...]
> Thus, considering the age-old problem of displaying columns
> in email clients using proportional fonts, do I have any other option
> for creating columns that could line up the data?

[...]

If a mail client uses proportional fonts for text emails, it is
broken and should be fixed.

When sending non text emails, note that you should use mime and
specify the content type.

In any case, you can use mime and provide with a HTML document
as attachment. All modern email clients support mime.

--
Stéphane
  Réponse avec citation
Vieux 24/07/2007, 19h36   #6
Stephane CHAZELAS
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: What is wrong with this printf?

2007-07-23, 00:57(+00), osiris@abydos.kmt:
[...]
> Thus, considering the age-old problem of displaying columns
> in email clients using proportional fonts, do I have any other option
> for creating columns that could line up the data?

[...]

If a mail client uses proportional fonts for text emails, it is
broken and should be fixed.

When sending non text emails, note that you should use mime and
specify the content type.

In any case, you can use mime and provide with a HTML document
as attachment. All modern email clients support mime.

--
Stéphane
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 09h21.


Édité par : vBulletin® version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,13843 seconds with 14 queries