Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'New Version for both Bash and Tcsh' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
New Version for both Bash and Tcsh
Authored by: Thomas Kaiser on Apr 03, '04 12:29:47PM
Two small additions:

> the bash way suitable for 99 percent of all cases

That means, this will work unless key or value contain "{", "}", or ";" because they will be converted while parsing the property list.

> tr ";" "n"

Should read "\n". The backslash character "\" has been eaten by the form submission, so once again:
defaults read "${HOME}/.MacOSX/environment" | tr -d "{" | tr -d "}" | sed 's{ = {={g' | tr ";" "\n" | grep "=" | while read -r OneLine; do eval export $OneLine; done


[ Reply to This | # ]