Checking the language variable

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Checking the language variable
# 1  
Old 06-21-2011
Checking the language variable

This is what I have just entered and received in return:
# echo $LANG
LANG: Undefined variable.

How can this be? I was expecting something like en_US.utf8. Am using FreeBSD 8.2.
# 2  
Old 06-21-2011
Presumably since you're in a shell that complains about undefined variables, you're using csh, which isn't a good idea.

As I understand it the LANG variable doesn't have to be defined, it's an override. Without it it assumes the system default.
# 3  
Old 06-22-2011
OK, thank you for your response. So bash it will be.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

Results Of A Variable Into An Array Using C Language

Can C add its results into an array like bash? For example using bash: cat /etc/passwd **truncated for space ** gdm:x:109:118:Gnome Display Manager:/var/lib/gdm:/bin/false mysql:x:110:122:MySQL Server,,,:/nonexistent:/bin/false statd:x:111:65534::/var/lib/nfs:/bin/false... (5 Replies)
Discussion started by: metallica1973
5 Replies

2. Shell Programming and Scripting

Checking the file depending on the input variable

Hi I have a requirement of taking time as input variable outside the script.depending on the time it will check the file output .like ./ <30 min> so should run every 5 minutes ie.6 times to check the output file.Can any one please help here. (7 Replies)
Discussion started by: netdbaind
7 Replies

3. Shell Programming and Scripting

Checking the variable in UNIX

Hi, I have a file abc.txt as ABC,TYU,1.2566 AHG,GJJ,1.898 hgh,FGA,1.854 My program is reading each line and storing the values variables base_cy, quo_cy, ra_amt Need to validate each of them as in: base_cy and quo_cy should be a 3 character alphabet among A-Z, if it is lower case ... (1 Reply)
Discussion started by: infyanurag
1 Replies

4. UNIX for Dummies Questions & Answers

checking wether an inputed character is already in a variable

Hi, i have a variable which holds a variety of letters. eg, var=qwertyuiop what i want to do is determine wether an inputed letter is already stored inside the variable, so i can say to enter a new one. i have been playing around using tr and grep but nothing seems to work at all. ... (2 Replies)
Discussion started by: castillo
2 Replies

5. Shell Programming and Scripting

checking variable has value - ksh

hi all, i have a shell (ksh) script where i am reading line by line from a grep command and i wanted to check if the grep command actually returned something or was null. i can do this by using -z : if ; then ..... but this forces me to do something when $myVariable is null when i... (3 Replies)
Discussion started by: cesarNZ
3 Replies

6. Shell Programming and Scripting

checking the value of the variable

Does anyone know the quick way to check if the variable contains only numeric characters, for example: A=123445 - correct B=#f123* - incorrect I am in ksh88i Thanks a lot for help -A (1 Reply)
Discussion started by: aoussenko
1 Replies

7. UNIX for Dummies Questions & Answers

ksh Checking if variable has 5 digits

How could I check if a numeric variable has 5 digits in KSH...I have a zipcode variable that I know will always be 5 digits, and I want to print out an error if it is less or more than 5 digits the problem is that I have it as: if ] but this won't work because the statement doesn't see 0001 as... (3 Replies)
Discussion started by: developncode
3 Replies

8. Shell Programming and Scripting

Eliminate variable checking in a script

RH Linux, $SHELL=/bin/ksh I have a .profile which I source in as such --> . .profile Whats happening is the variables are getting validated and generating errors. for example .profile export foo=/to/the/moon when I . .profile , I get : not foundmyusername/.profile or bad... (8 Replies)
Discussion started by: BMetelsky
8 Replies

9. Shell Programming and Scripting

checking valid values in variable

I'm using the following in my script. if echo $cpuidle |/usr/bin/egrep ; then when I issue this statement it issues the value of the variable back to stdout which ends up in my output file. Is there a better way to write this? I'm using ksh on solaris 9. (3 Replies)
Discussion started by: MizzGail
3 Replies

10. Shell Programming and Scripting

checking a variable is within range

how can i check that a variable is between 0-100, like if i ask a user to input a number between 1-100 and i want to excute commands WHILE that number is between that range or else i will keep asking the user to make another input here's what i got #!/bin/bash echo "Guess my secret number... (2 Replies)
Discussion started by: Poison Ivy
2 Replies
Login or Register to Ask a Question