Sponsored Content
Top Forums Shell Programming and Scripting Problem with expr command in shell script Post 302739773 by Corona688 on Wednesday 5th of December 2012 12:55:04 AM
Old 12-05-2012
It does so because 00 isn't a valid day. You can't just add 1 and get a sensible answer.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

problem with sed command in shell script.

Guys, I've a problem in the "sed" command used in my shellscripts This is the problamatic line in my shell script: sed -e 's/${line1}/${line1_m}/g' prod_hier_1234.txt > test.txt It doesn't do the job of replacing the string stored in variable 'line1' to 'line1_m'. However If I replace the... (10 Replies)
Discussion started by: bhagat.singh-j
10 Replies

2. Shell Programming and Scripting

expr problem

Hi, in my ksh script expr 22 / 10 results as 2 but the actual result expected in 2.2. how do i get that result. Please help Thanks, (2 Replies)
Discussion started by: kotasateesh
2 Replies

3. UNIX for Dummies Questions & Answers

expr problem

Hi, in my ksh script expr 22 / 10 results as 2 but the actual result expected in 2.2. how do i get that result. Please help Thanks, (4 Replies)
Discussion started by: kotasateesh
4 Replies

4. UNIX for Dummies Questions & Answers

problem with expr command

:) hi Unix gurus, Pls consider the following piece of code str='hello' length=echo $str|wc -c echo $length y= ` expr \( 80 - $length \) ` echo $y :confused: The last echo stmt is displaying 0 as the result. If i put direct value like 6 instead of $length in i 3rd stmt it is giving... (8 Replies)
Discussion started by: ravi raj kumar
8 Replies

5. Shell Programming and Scripting

Problem with MV command in Shell Script

Hi Guru's, I 'm trying to execute the below given script in Unix. I am having an issue with the script. The output of the script is given below: #!/bin/bash File_Home="/home/essftp/Risk" cd /home/essftp/Risk rm -f FileList rm -f credit_risk* file1=`ls -lt... (4 Replies)
Discussion started by: ranjith_taurean
4 Replies

6. Shell Programming and Scripting

shell script problem , sudo mount command

cat test.sh sudo mount -t vfat /dev/sda7 /media/Ddrive If i double click the test.sh file and select run in terminal then the terminal prompts for password. How can i avoid typing password? Or if i double click test.sh file and select run then nothing happens. What i'm trying "Double... (3 Replies)
Discussion started by: cola
3 Replies

7. Shell Programming and Scripting

problem in exit status of the command in a shell script-FTP

Hi All, I have developed below script for FTP a file from unix machine to another machine. ftpToABC () { USER='xyz' PASSWD='abc' echo "open xx.yy.zbx.aaa user $USER $PASSWD binary echo "put $1 abc.txt" >> /home/tmp/ftp.$$ echo "quit" >> /home/tmp/ftp.$$ ftp -ivn <... (3 Replies)
Discussion started by: RSC1985
3 Replies

8. Shell Programming and Scripting

Problem Executing Firmware Command using Shell Script

Guys, I have a script that should change one of the configuration Parameter in a http accelerator, this config change which will halt http traffic into device. So I have designed a script which should do these changes. But after executing this script, found that one of the input variable is not... (8 Replies)
Discussion started by: raghunsi
8 Replies

9. Shell Programming and Scripting

help with expr command in script

Hi, I am trying to code a unix function to calculate date difference between two date variables. I am stuck at a point where I am trying to convert hours into minutes. Below is the code I am doing. function get_elapsed_time { export PROPS_FILE=temp.properties export... (8 Replies)
Discussion started by: Nutan
8 Replies

10. Shell Programming and Scripting

Problem using cut command in shell script

I'm new to shell programming, and am having a problem in a (Korn) shell program, which boils down to this: The program reads a record from an input file and then uses a series of "cut" commands to break the record into parts and assign the parts to variables. There are no delimiters in the... (2 Replies)
Discussion started by: joroca
2 Replies
validlocale(8)															    validlocale(8)

NAME
validlocale - Test if a given locale is available SYNTAX
validlocale <locale> DESCRIPTION
Test if the locale given as argument is a valid locale. If it isn't, print on stdout the string to add to /etc/locale.gen to make locale-gen generate the locale (if it exists at all). FILES
/usr/sbin/validlocale /usr/share/i18n/SUPPORTED ENVIRONMENT VARIABLES
DEFAULTCHARSET Which charset to assume if the given locale is missing from the list of supported locales. EXAMPLES
If you give a valid locale as parameter, it outputs a string specifying this on stderr: % validlocale C locale 'C' valid and available When given a invalid (not generated or just nonexistent), it outputs a string on stderr telling that this is an invalid locale, and a string to stdout with the string to add to /etc/locale.gen to have this locale generated: % validlocale de_AU@euro locale 'de_AU@euro' not available de_AU@euro ISO-8859-15 AUTHORS
Petter Reinholdtsen <pere@hungry.com> SEE ALSO
locale-gen(8), localedef(1), locale(1) Petter Reinholdtsen 0.1 validlocale(8)
All times are GMT -4. The time now is 08:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy