11-15-2016
I don't think setlocale can do anything for your above problem; it sets all the locale dependent variables to reflect your country, language, monetary system, time format and more.
For a menu as indicated, you might want to dive into bash's select buitlin - if you are using bash, that is, which you failed to mention.
10 More Discussions You Might Find Interesting
1. Linux
Hi,
I need to put this command in a batch shell.
sqlplus -s user/password @test.sql
and in the test.sql I have this command
select * from pbempl where pebempl_id = $1;
How I can pass the variable $1 from the batch shell???
Thanks (2 Replies)
Discussion started by: rama71
2 Replies
2. UNIX for Dummies Questions & Answers
How do I execute a batch command from a script, which "waits" with the next command until the first one has finished?
=======
A piece of my script looks like this:
#!/bin/sh
(...)
# run a long batch job:
./run_calculation.sh
# then rename resulting file:
mv output.dat backup.dat
(...)
... (7 Replies)
Discussion started by: ivvo
7 Replies
3. Shell Programming and Scripting
Hi friends!
I am having some simple shell script files to build postgresql database and all. Now i want to convert those scripts to dos batch scripts(to run on windows XP/2000/NT) because there is no need of unix emulation for latest release of postgresql. Please somebody help me. (1 Reply)
Discussion started by: darwinkna
1 Replies
4. Solaris
Here is the situation. We are a company that has been using a professional publishing system, the software is called "ProType". It runs on Solaris 2.4, however it is no longer supported and we are forced to move on to Adobe Indesign. We must convert all our documents (thousands) to InDesign format.... (4 Replies)
Discussion started by: Fred Goldman
4 Replies
5. Shell Programming and Scripting
Hi,
When I run the below script in UNIX it's throwing syntax errors. Actually it's a windows batch script. Could anyone change the below Windows Batch script to UNIX shell script...
Script:
REM :: File Name : Refresh_OTL.bat
REM :: Parameters : %1 - Region
REM :: : %2 - Cube Type
REM ::... (5 Replies)
Discussion started by: tomailraj
5 Replies
6. Shell Programming and Scripting
Hello everyone. I am new to shell scripting and i am required to create a shell script, the purpose of which i will explain below.
I am on a solaris server btw.
Before delving into the requirements, i will give youse an overview of what is currently in place and its purpose.
... (2 Replies)
Discussion started by: goddevil
2 Replies
7. Shell Programming and Scripting
Can anyone help me with a dos batch script to execute a shell script residing in an unix server. I am not able to use ssh.
Thanks in advance (2 Replies)
Discussion started by: Shri123
2 Replies
8. Shell Programming and Scripting
Hi,
This is my DOS Batch file.
@echo off
echo "Program Name :" %0
rem echo "Next param :" %1
echo "Next param :" "Username/Password"
echo "User Id :" %2
echo "User Name :" %3
echo "Request ID ... (4 Replies)
Discussion started by: Rami Reddy
4 Replies
9. Shell Programming and Scripting
Hi team,
My requirement is to transfer pdf files from windows machine to unix server and then from that unix server we should sftp to another server.
I have completed the first part i.e From windows to using to unix server with the help of psftp.exe
code:
psftp user@host -pw password <... (1 Reply)
Discussion started by: bhupeshchavan
1 Replies
10. Shell Programming and Scripting
Hi All,
I have a small tool which is currently configured in batch scripts only. But my need is to run it on Linux platform, so I have been trying to convert a batch script to shell script.
below is the batch script:
@echo off
IF "%1"== "" GOTO ARGERR
REM UPDATE THESE PROPERTIES TO... (2 Replies)
Discussion started by: sukhdip
2 Replies
LEARN ABOUT MOJAVE
setlocale
SETLOCALE(3) BSD Library Functions Manual SETLOCALE(3)
NAME
setlocale -- natural language formatting for C
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <locale.h>
char *
setlocale(int category, const char *locale);
DESCRIPTION
The setlocale() function sets the C library's notion of natural language formatting style for particular sets of routines. Each such style
is called a 'locale' and is invoked using an appropriate name passed as a C string.
The setlocale() function recognizes several categories of routines. These are the categories and the sets of routines they select:
LC_ALL Set the entire locale generically.
LC_COLLATE Set a locale for string collation routines. This controls alphabetic ordering in strcoll() and strxfrm().
LC_CTYPE Set a locale for the ctype(3) and multibyte(3) functions. This controls recognition of upper and lower case, alphabetic or non-
alphabetic characters, and so on.
LC_MESSAGES Set a locale for message catalogs, see catopen(3) function.
LC_MONETARY Set a locale for formatting monetary values; this affects the localeconv() function.
LC_NUMERIC Set a locale for formatting numbers. This controls the formatting of decimal points in input and output of floating point num-
bers in functions such as printf() and scanf(), as well as values returned by localeconv().
LC_TIME Set a locale for formatting dates and times using the strftime() function.
Only three locales are defined by default: the empty string "" (which denotes the native environment) and the "C" and "POSIX" locales (which
denote the C language environment). A locale argument of NULL causes setlocale() to return the current locale. An argument of "" will
determine the name of the new locale taking into account the environment variables LANG and LC_*. If these environment variables yield a
locale that is invalid, NULL will be returned and the current locale will remain unchanged. By default, C programs start in the "C" locale.
The only function in the library that sets the locale is setlocale(); the locale is never changed as a side effect of some other routine.
RETURN VALUES
Upon successful completion, setlocale() returns the string associated with the specified category for the requested locale. The setlocale()
function returns NULL and fails to change the locale if the given combination of category and locale makes no sense.
FILES
$PATH_LOCALE/locale/category
/usr/share/locale/locale/category locale file for the locale locale and the category category.
/usr/local/share/locale/locale/category
locale file for the locale locale and the category category.
ERRORS
No errors are defined.
SEE ALSO
colldef(1), mklocale(1), catopen(3), ctype(3), localeconv(3), multibyte(3), strcoll(3), strxfrm(3), euc(5), utf8(5), environ(7)
STANDARDS
The setlocale() function conforms to ISO/IEC 9899:1999 (``ISO C99'').
HISTORY
The setlocale() function first appeared in 4.4BSD.
BSD
November 21, 2003 BSD