Sponsored Content
Top Forums Programming How to do 'export LANG=en" Using C Post 302184440 by Ram Das on Friday 11th of April 2008 12:52:17 PM
Old 04-11-2008
Hello era,

Defenetly helpfull this "putenv() or setenv()" .

Thank you.
Ram Das
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Lang

Hi, I have LANG set to C.iso88591 what does this value mean and what other options do I have? The problem is that I am using mailx to send out reports. When the report arrives the email has a lot of details about a charecter set not being supported. I don't want to have a null value... (0 Replies)
Discussion started by: nhatch
0 Replies

2. UNIX for Dummies Questions & Answers

Where to set the LANG variable

When I login to my AIX server, the LANG variable is automatically being set to En_US. This is causing locale warning messages when I run emacs or perl. The reason seems to be that En_US is not a valid locale (seen by running locale -a). I can change the variable from the command line (export... (3 Replies)
Discussion started by: wvdeijk
3 Replies

3. Programming

export PS1='"\[\033[1;34m\]\T \d | System_Analyst.\[\033[0m\]'

Dear All, I have a problem with export. I would like to show a prompt on my shell but as I receive the export environment variable pointer it is the string. Like it is shown in the Title of this message How I can get the result of that command after execution in a string I mean I would like to... (6 Replies)
Discussion started by: mobile01
6 Replies

4. Ubuntu

LANG=C not English?

On Ubuntu 7.04, why would the "C" LANG parameter not be English: $ LANG=C locale LANG=C LANGUAGE=he_IL:he:en_GB:en LC_CTYPE="he_IL.utf8" LC_NUMERIC="he_IL.utf8" LC_TIME="he_IL.utf8" LC_COLLATE="he_IL.utf8" LC_MONETARY="he_IL.utf8" LC_MESSAGES="he_IL.utf8" LC_PAPER="he_IL.utf8"... (4 Replies)
Discussion started by: dotancohen
4 Replies

5. Shell Programming and Scripting

Command to view full data "export MAESTRO_OUTPUT_STYLE=LONG"

Hi, Always when I login to Unix, I need to give the following command to view the data properly; export MAESTRO_OUTPUT_STYLE=LONG The reason is that by default the settings export MAESTRO_OUTPUT_STYLE=SHORT Please let me know how I could make LONG as the default and avoid giving the... (1 Reply)
Discussion started by: jmathew99
1 Replies

6. UNIX for Dummies Questions & Answers

What is "/export" directory used for?

the question as this topic. (5 Replies)
Discussion started by: thsecmaniac
5 Replies

7. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

8. UNIX for Dummies Questions & Answers

How to Export Glance "Global System Calls" data to a file

Hello... I'm trying to setup a cronjob to record system data using glance at certain times of the day. My question is, how would one export the "Global System Calls" information to a file? Below is the command I have been using and it works to export CPU information. glance -f ... (0 Replies)
Discussion started by: fumus
0 Replies

9. HP-UX

install arabic lang

hi how to install arabic language and set it as default in hpux. also there is any website provide vm for hpunix for testing. (2 Replies)
Discussion started by: drpix
2 Replies

10. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies
GETENV(3)						   BSD Library Functions Manual 						 GETENV(3)

NAME
getenv, getenv_r, putenv, setenv, unsetenv -- environment variable functions LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <stdlib.h> char * getenv(const char *name); int getenv_r(const char *name, char *buf, size_t len); int setenv(const char *name, const char *value, int overwrite); int putenv(char *string); int unsetenv(const char *name); DESCRIPTION
These functions set, unset and fetch environment variables from the host environment list. For compatibility with differing environment con- ventions, the getenv() or getenv_r() given argument name may be appended with an equal sign ``=''. The getenv() function obtains the current value of the environment variable name. If the variable name is not in the current environment, a NULL pointer is returned. The getenv_r() function obtains the current value of the environment variable name and copies it to buf. If name is not in the current envi- ronment, or the string length of the value of name is longer than len characters, then -1 is returned and errno is set to indicate the error. The setenv() function inserts or resets the environment variable name in the current environment list. If the variable name does not exist in the list, it is inserted with the given value. If the variable does exist, the argument overwrite is tested; if overwrite is zero, the variable is not reset, otherwise it is reset to the given value. The putenv() function takes an argument of the form ``name=value'' and it will set the environment variable ``name'' equal to ``value'' by altering an existing entry, or creating a new one if an existing one does not exist. The actual string argument passed to putenv() will become part of the environment. If one changes the string, the environment will also change. The unsetenv() function deletes all instances of the variable name pointed to by name from the list. RETURN VALUES
The functions getenv_r(), setenv(), putenv(), and unsetenv() return zero if successful; otherwise the global variable errno is set to indi- cate the error and a -1 is returned. If getenv() is successful, the string returned should be considered read-only. ERRORS
[EINVAL] The name argument to setenv() or unsetenv() is a null pointer, points to an empty string, or points to a string containing an ``='' character. The value argument to setenv() is a null pointer. The string argument to putenv() is a null pointer, or points to a string that either starts with a ``='' character or does not contain one at all. [ENOMEM] The function setenv() or putenv() failed because they were unable to allocate memory for the environment. The function getenv_r() can return the following errors: [ENOENT] The variable name was not found in the environment. [ERANGE] The value of the named variable is too long to fit in the supplied buffer. SEE ALSO
csh(1), sh(1), execve(2), environ(7) STANDARDS
The getenv() function conforms to ANSI X3.159-1989 (``ANSI C89''). The putenv() function conforms to X/Open Portability Guide Issue 4 (``XPG4''). The unsetenv() function conforms to IEEE Std 1003.1-2001 (``POSIX.1''). HISTORY
The functions setenv() and unsetenv() appeared in Version 7 AT&T UNIX. The putenv() function appeared in 4.3BSD-Reno. BSD
October 25, 2010 BSD
All times are GMT -4. The time now is 06:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy