operating-system


Valid characters for environment variables across operating systems


While trying to create a reliable application configuration strategy for different applications based on system properties and environment variables I asked myself whether there are known characters and special chars that work across all operating systems.
For example on my Mac OS X dots cannot be easily used in environment variables because setting them the way I set other environment variables was not possible inside my .profile file:
# configuration for myapp
grails.myapp.config=/some/directory/and/file.groovy;
export grails.myapp.config
As far as I know usually environment variables have a key with uppercase letters and the underscore in it. Is there a known subset of all characters that I can use across all common operating systems?
I looked at the Open Group/POSIX standards site to see what they say. Their XCU specification calls for support of uppercase letters, digits, and underscores (so what you anticipated plus the digits 0-9).
At least it's a referenceable standard.
Paranoia 101: use ASCII letter characters and underscores only. Generally upper and lower case letters are legal, but convention dictates using upper case letters.

Related Links

Why is there an OS segment reserved in virtual memory
What check to make in exec-missing in PINTOS
What does the kernel do while another process is running
Not able to understand fork() system call clearly?
Process termination by his parent or other processes
Using SIMD instructions in application oriented to multiple platforms and OS
Identify operating system
Do CPU and main memory need drivers to work?
Page frame number vs. Page table entry
About FAT-32 File System
Does a virtual address always translate to a physical one
How does the Virtual Memory Management System determine the backing store location in the disk?
Paged virtual address translation using a linear page table
Condition for deadlock to happen
Upating page table when an entry is evicted from TLB
what is the difference between kernel and system software?

Categories

HOME
protocol-buffers
libgdx
long-integer
key
command-prompt
message-queue
adobe
openlayers-3
android-emulator
consul
elisp
angular-meteor
u-boot
static-analysis
driver
solution
circleci
bootstrap-switch
mailmerge
sslhandshakeexception
jodatime
dhcp
dma
supervisord
heap-dump
hidden
parceler
raml
libgit2
dashdb
websphere-portal
function-points
jpa-2.1
cellular-network
sap-lumira
python-imageio
netbios
python-2.x
creation
assertions
code-rally
identify
iscroll
rdp
jacoco-maven-plugin
data-uri
vb.net-to-c#
robust
elasticsearch-aggregation
absolute
amazon-elastic-beanstalk
exc-bad-access
wildfly-9
dmarc
coovachilli
meld
largenumber
fanotify
nastran
highest
asp.net-web-api-helppages
css-paged-media
hmisc
dynamics-ax-2012-r2
sequence-sql
google-gdk
mobilefirst-server
cache-manifest
mxe
python-c-extension
incron
fasterxml
windows-rt
lumia-imaging-sdk
android-2.3-gingerbread
distributed-r
neo4jphp
commenting
miglayout
boolean-algebra
code39
jmenubar
eclim
bcdedit
ui-design
significant-digits
audiotoolbox
telerik-ajax
thejit
pageheap
jzmq
opends
uploading
memory-pool
botnet
downgrade
chunking
tabbarcontroller
browser-based
rational-unified-process
ppc
ning

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App