Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

closed as not a real question by mdpc, EEAA, Scott Pack, Ward, rnxrx Aug 23 '12 at 16:52

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

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. –  geekosaur Apr 10 '12 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. –  Isius Apr 10 '12 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. –  geekosaur Apr 10 '12 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 :-) –  voretaq7 Apr 10 '12 at 21:43
    
Ha, I'd love to find the documentation. Looked for it first. Still looking. –  Isius Apr 10 '12 at 21:56

1 Answer 1

up vote 1 down vote accepted

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 :-)

share|improve this answer
    
He probably has a domain name like whorepresents.com, expertsexchange.com or therapistfinder.com and wants to make sure no one misunderstands :) –  cjc Apr 10 '12 at 21:53
1  
@cjc It's only polite to buy a whore a present for the holidays, I certainly wouldn't want an amateur performing gender reassignment surgery, and it's very important to be able to find rapists - you certainly don't want to move in next to one! :-D –  voretaq7 Apr 10 '12 at 21:55
    
@cjc, don't forget about PenIsland.com –  glenn jackman Apr 10 '12 at 22:23
    
@glennjackman I'm not touching that one :-) –  voretaq7 Apr 11 '12 at 15:27

Not the answer you're looking for? Browse other questions tagged or ask your own question.