-1

In my mt-daapd config file is the line

name = %h 

which, if I understand correctly, when my hostname is aCoolHostname this will evaluate to

name = acoolhostname 

in lowercase.

How do I use the %h but keep the lovely case formatting?

6
  • 3
    In what config file for what program? There are no standards for such escape sequences; it's up to the program that processes it. Commented Apr 10, 2012 at 21:29
  • this particular config is for mt-daapd. But I thought this was a shell thing. It's so difficult to search Google for %h. Commented Apr 10, 2012 at 21:31
  • 2
    symbolhound.com may work better for symbol searches, but no, shells don't typically expand such escapes except within their own scripts (not random configuration files for other programs); and %h in the shell would look for a job name starting with h, not a hostname. Commented Apr 10, 2012 at 21:41
  • 2
    Searching Google for %h is like asking the doctor to tell you why your arm hurts. While you're in New York, USA and the doctor is in Sidney, Australia. The documentation for the mt-daapd configuration file would be a better place to start :-) Commented Apr 10, 2012 at 21:43
  • Ha, I'd love to find the documentation. Looked for it first. Still looking. Commented Apr 10, 2012 at 21:56

1 Answer 1

1

Consult the documentation for mt-daapd -- being unable to find any after a quick Google search, my best-guess inclination is that %h expands to the local system's hostname, and hostnames are case-insensitive (RFC 952, RFC 1123).

The internet has no respect for your "lovely" capitalization, so the software sees no reason to preserve it. If my guess is correct the only way to preserve it would be to manually specify the hostname (with the capitalization you want) instead of using the expansion macro %h, and this does not guarantee that the software wouldn't just throw away the capitalization again, as it's meaningless in the context of hostnames.
Bottom line: you probably want to get used to seeing your hostname in lower case :-)

3
  • He probably has a domain name like whorepresents.com, expertsexchange.com or therapistfinder.com and wants to make sure no one misunderstands :) Commented Apr 10, 2012 at 21:53
  • @cjc, don't forget about PenIsland.com Commented Apr 10, 2012 at 22:23
  • @glennjackman I'm not touching that one :-) Commented Apr 11, 2012 at 15:27

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.