- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following bash command line does what I want:
LCL_ALL=C tr ...
where the ellipsis is just some arguments and IO redirection stuff. However when I issue the exact same command line from my program (compiled with 11.1 on OSX 10.6):
call system("LCL_ALL=C tr ...")
it behaves as if the LCL_ALL=C is absent. Anyone know what's happening here?
Al
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
your system call is creating a local environment (inheriting settings from your program runtime environment)
consider using EXPORT LCL_ALL=C tr...
See: http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_02.html
Jim Dempsey
consider using EXPORT LCL_ALL=C tr...
See: http://tldp.org/LDP/Bash-Beginners-Guide/html/sect_03_02.html
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I assume then I'll actually have to do somehting like:
call system("exportLCL_ALL=C && tr ...")
in order or execute the TRanslate command afterwards like my original syntax did.
Al
call system("exportLCL_ALL=C && tr ...")
in order or execute the TRanslate command afterwards like my original syntax did.
Al
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Or invoke a shell script which sets the desired shell for itself.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page