Sponsored Content
Full Discussion: Problem with variable value
Top Forums Shell Programming and Scripting Problem with variable value Post 302397550 by alister on Monday 22nd of February 2010 01:36:53 PM
Old 02-22-2010
Because

Code:
  6 ...while IFS="" read -n 1 caracter
  7    do
  8       contador=$((${contador}+1))
  9       echo $contador
 10    done

is executing in a subshell. $contador inside that loop and $contador outside of it have nothing to do with each other.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Problem with variable type

Dear All, I am trying to write an script to calculate geometric centre of selected residues of a protein structure. Say I have a PDB file (a text containing the x, y, and z coordinates of atoms of a protein). I want to extract the X coordinates of the atoms belonging to the interested residues... (2 Replies)
Discussion started by: siavoush
2 Replies

2. UNIX for Dummies Questions & Answers

grep for a variable problem

I am trying to use two files and walk through the first one to see if a value from each record resides in the other file. I am reading the file record by record and awking out the first field into a varaiable. That is working fine. When I try to write my grep command it gives me an error. ... (7 Replies)
Discussion started by: MizzGail
7 Replies

3. Shell Programming and Scripting

Help me in this variable problem

suppose i declare a=b b=30 echo $(echo $a) i need to get the value as 30 i dont know if im right but it prints only 'b' as output. How can i get the value referred by 'b' through the value of 'a' (4 Replies)
Discussion started by: SankarV
4 Replies

4. Shell Programming and Scripting

Problem with variable use

Hi, I need a little help with variable use: I have the a file with follow format: Type: Test Profile: 010 84240 27 15 84900 11 09 84993 55 44 84762 12 12 I need to look the value in the line containing "Profile" and put in front of the lines containing numbers... (6 Replies)
Discussion started by: cgkmal
6 Replies

5. Shell Programming and Scripting

Problem wit the $? variable

Hi Friends, I have a problem when i run this piece of script, and do echo $? it always gives me value 0, even if the string "CCRCWebServerINSTALLDIR" is not present in that file. Why is that so, can you give me suggestion to the changes i need to make? $find... (3 Replies)
Discussion started by: asirohi
3 Replies

6. Shell Programming and Scripting

Problem in storing value to variable

#bash curVer=`cat /var/sadm/clsversion | cut -f 2 -d "_"` echo "CurVer:$curVer" ls |grep -v tar| grep -v sh| grep -v log|cut -f 1 -d "_" | sort -u >tmp1 for line in $(cat tmp1) do ver=`echo $line_$curVer` ls $line* |sort >tmp2 grep -n ${ver} tmp2 >/dev/null ... (2 Replies)
Discussion started by: rajamohan
2 Replies

7. Shell Programming and Scripting

awk variable problem

Hi How are you people .. I am facing another problem regarding awk below is my code -bash-3.00$ export a=10 -bash-3.00$ echo $a 10 -bash-3.00$ echo "" | nawk -v var=$a ' { if(var=10) { print "abc" } else { print "def"} } ' abc -bash-3.00$ echo "" | nawk -v var=$a ' { if(var==10)... (2 Replies)
Discussion started by: aishsimplesweet
2 Replies

8. Shell Programming and Scripting

problem in variable comparision

Hi All, I need to compare the string variable with input value which have more than one word which also should be case insensitive. #!/bin/sh echo "please choose your choice: " read choice if ` ] then echo "correct" else echo "wrong" fi but i am getting the output for first word... (3 Replies)
Discussion started by: kalai
3 Replies

9. Shell Programming and Scripting

Problem with a variable withing a variable

hello there, basically im screwed with a variable that should take the last modification date of a file. my code is fileCreationTime=$(( `ls -l $fileName | tr -s " " | cut -d " " -f6` )) my problem arise coz when the code is executed and stored in a file the return value is 1993 and not... (4 Replies)
Discussion started by: thurft
4 Replies

10. Shell Programming and Scripting

problem in assigning value to variable have value fo other variable

my script is some thing like this i11="{1,2,3,4,5,6,7,8,9,10,11,}" echo "enter value" read value ..............suppose i11 x="$value" echo "$($value)" .............the echo should be {1,2,3,4,5,6,7,8,9,10,11,} but its showing "i11" only. plz help me out to get desired... (10 Replies)
Discussion started by: sagar_1986
10 Replies
Locale::Codes::LangExt(3)				User Contributed Perl Documentation				 Locale::Codes::LangExt(3)

NAME
Locale::Codes::LangExt - standard codes for language extension identification SYNOPSIS
use Locale::Codes::LangExt; $lext = code2langext('acm'); # $lext gets 'Mesopotamian Arabic' $code = langext2code('Mesopotamian Arabic'); # $code gets 'acm' @codes = all_langext_codes(); @names = all_langext_names(); DESCRIPTION
The "Locale::Codes::LangExt" module provides access to standard codes used for identifying language extensions, such as those as defined in the IANA language registry. Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default IANA language registry codes will be used. SUPPORTED CODE SETS
There are several different code sets you can use for identifying language extensions. A code set may be specified using either a name, or a constant that is automatically exported by this module. For example, the two are equivalent: $lext = code2langext('acm','alpha'); $lext = code2langext('acm',LOCALE_LANGEXT_ALPHA); The codesets currently supported are: alpha This is the set of three-letter (lowercase) codes from the IANA language registry, such as 'acm' for Mesopotamian Arabic. This is the default code set. ROUTINES
code2langext ( CODE [,CODESET] ) langext2code ( NAME [,CODESET] ) langext_code2code ( CODE ,CODESET ,CODESET2 ) all_langext_codes ( [CODESET] ) all_langext_names ( [CODESET] ) Locale::Codes::LangExt::rename_langext ( CODE ,NEW_NAME [,CODESET] ) Locale::Codes::LangExt::add_langext ( CODE ,NAME [,CODESET] ) Locale::Codes::LangExt::delete_langext ( CODE [,CODESET] ) Locale::Codes::LangExt::add_langext_alias ( NAME ,NEW_NAME ) Locale::Codes::LangExt::delete_langext_alias ( NAME ) Locale::Codes::LangExt::rename_langext_code ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangExt::add_langext_code_alias ( CODE ,NEW_CODE [,CODESET] ) Locale::Codes::LangExt::delete_langext_code_alias ( CODE [,CODESET] ) These routines are all documented in the Locale::Codes::API man page. SEE ALSO
Locale::Codes The Locale-Codes distribution. Locale::Codes::API The list of functions supported by this module. http://www.iana.org/assignments/language-subtag-registry The IANA language subtag registry. AUTHOR
See Locale::Codes for full author history. Currently maintained by Sullivan Beck (sbeck@cpan.org). COPYRIGHT
Copyright (c) 2011-2013 Sullivan Beck This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.16.3 2013-02-27 Locale::Codes::LangExt(3)
All times are GMT -4. The time now is 03:00 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy