Operating System - HP-UX
1834410 Members
2047 Online
110067 Solutions
New Discussion

Re: simple question with wrong answers

 
SOLVED
Go to solution
simon_164
Super Advisor

simple question with wrong answers

what is the value of the $LANG if the variable is not set or is empty:
-C
-JAVA
-BASh
-PoSIX
-fortran

Any ideas?
12 REPLIES 12
Pete Randall
Outstanding Contributor

Re: simple question with wrong answers

$ echo $LANG
su: LANG: Parameter not set.


Pete

Pete
Hemmetter
Esteemed Contributor
Solution

Re: simple question with wrong answers

Hi Simon

The anser is "C" = "Posix"

see man locale(1): EXTERNAL INFLUENCES
and lang(5)

rgds
HGH
Hein van den Heuvel
Honored Contributor

Re: simple question with wrong answers

Hmm,

Best I know LANG is to do with human language/text, not with compilers.

On my Linux box it is set to: en_US.UTF-8

Check 'man environ'

LANG The string used to specify internationalization infor-
mation that allows users to work with different
national conventions. The setlocale(3C) function
checks the LANG environment variable when it is called
with "" as the locale argument. LANG is used as the
default locale if the corresponding environment vari-
able for a particular category is unset or null. If,
however, LC_ALL is set to a valid, non-empty value,
its contents are used to override both the LANG and
the other LC_* variables. For example, when invoked as
setlocale(LC_CTYPE, ""), setlocale() will query the
LC_CTYPE environment variable first to see if it is
set and non-null. If LC_CTYPE is not set or null, then
setlocale() will check the LANG environment variable
to see if it is set and non-null. If both LANG and
LC_CTYPE are unset or NULL, the default "C" locale
will be used to set the LC_CTYPE category....

hth,
Hein.
Arunvijai_4
Honored Contributor

Re: simple question with wrong answers

Hi Simon,

Take a look at this doc,

http://docs.hp.com/en/5185-4400/ch01s03.html
[Managing the LANG Environment Variable]

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Steven E. Protter
Exalted Contributor

Re: simple question with wrong answers

None of the above?

If its not set, nothing is in it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
simon_164
Super Advisor

Re: simple question with wrong answers

thank you!!
this question could have saved my day since i got 64 % on my CSE exam. the passing score is 65 %.
tcsa
Frequent Advisor

Re: simple question with wrong answers

I guess you have taken your time you could have guessed it right by proceeding by elimination. If you look at the choices correctly: there are 2 shells names and 2 Programming language names (Java, C, and Fortran). You can discard those 3 quickly
You are left with 2 most popular shell names.

C, is also a shell, but my best guess here is they were referring to the C as shell they would have precised it as C shell. But it can not be your choice anyway.

BASH, it is default shell in Linux

POSIX, it is default shell in HP-UX

I think even if you have no clue your best guess should have been POSIX.

So I must agree with someone who said that the answer was POSIX.

On another note, make sure if you are not breaking any rules or breaching the agreement you signed to no disclose anything related to content of the exam. I think this is a content of the exam.

Finally, don't be discouraged by you score. Study hard again and you will probably get a higher score next time. I would suggest you to use Marty Poniatowski book to supplement your studies.
Determination is key for success.
A. Clay Stephenson
Acclaimed Contributor

Re: simple question with wrong answers

If that is an exact quote of the question (which I rather doubt because of your syntax and inattention to case) then none of the answers are correct. However, if by using The Force I can infer what the question actually was, the correct answer was C and anyone considered a competent admin (certified or not) should know this.
If it ain't broke, I can fix that.
tcsa
Frequent Advisor

Re: simple question with wrong answers

I just checked the manual page it is saying that C and POSIX are used interchangeably. But the default processing language for HP-UX is POSIX

http://nixdoc.net/man-pages/HP-UX/man5/lang.5.html
Determination is key for success.
tcsa
Frequent Advisor

Re: simple question with wrong answers

I just checked the manual page it is saying that C and POSIX are used interchangeably. But the default processing language for HP-UX is POSIX

http://nixdoc.net/man-pages/HP-UX/man5/lang.5.html

Determination is key for success.
simon_164
Super Advisor

Re: simple question with wrong answers

well, i thought the answer is POSIX. but when i came to my company. I ran to the HP-UX machine to try it and i got the usual answer of "parameter not .." when u are trying to echo an unknown parameter. then i posted this thread and someone pointed out to check the manual of "locale" which i did. and the answer was there. the answer should be "C". no body would have guessed it if he didn't see the manual page. which is not common. you have a lot of things to worry about other than this. Any way i'm gonna study hard to get this exam. i think i'm gonna take another shot this friday.
tcsa
Frequent Advisor

Re: simple question with wrong answers

Good luck to you!

tcsa
Determination is key for success.