hi,
actully i need the belp for the below.
host_list=" Host1 host2 host3 host4 "
n=`hostname`
i need to put the condition like the below
if n is among the host mention in the host_list if
then
#some stugg
else
# some other stuff
fi (1 Reply)
Hi ,
I am trying the following simple script . But it is always giving 1 output. Dont know why
#!/bin/sh
find . -name "a.log"
if ; then
echo "1"
else
echo "0"
fi
Kindly advice. it is giving 1 output even when the a.log file is not there (26 Replies)
a=rhino
b=crocodil
c=testsc
if && "$c" = testsc ]
then
echo "Test #5 succeeds."
else
echo "Test #5 fails."
fi
i need to test or condition before check the output with AND condition. ur help is much appreciated... (11 Replies)
Hi all,
I have task to delete two different files from all file system. one is core file & other is old file.
i can delete core file but for old file i have to mv in different location.
i wrote a script but it is not working.
i have a two variables in this script first one is delcnt &... (6 Replies)
Hi, I'm writing a bash script and i have a condition that goes
if
then
break
fi
but, when i go to run it, i come across this
line 10: '
where line 10 is the if
I don't know what's going on :( (2 Replies)
Hi, below is the script in ksh and i am having issues with if condition.
It takes in one argument as input and executes the shell script.
The problem is in if condition in shell script. If input is given as 1 it works out well. But if input is given as 2 or something else the script is failing to... (1 Reply)
Hi friends,
I'm having a bit of a problem using shell variable in an awk if statement.
Please note that i'm using -v option as listed in many forums but I still don't get it working. Here's my code. Kindly help as I've gone crazy trying to work this out :wall:
#!/bin/bash -xv
... (4 Replies)
Hello experts,
I'm stuck with this script for three days now. Here's what i need.
I need to split a large delimited (,) file into 2 files based on the value present in the last field.
Samp: Something.csv
bca,adc,asdf,123,12C
bca,adc,asdf,123,13C
def,adc,asdf,123,12A
I need this split... (6 Replies)
Hi All,
Seeking for your assistance on how to condition it correctly.
cat file1.txt
290,1663,43,888,0,0.00,86.91,0.00,26.98,0.00
290,1663,52,0,0,0.00,0.00,0.00,0.00,0.00
290,1663,52,888,0,0.00,34.60,0.00,9.00,0.00
1st scenario:
if the fourth column contains 888s and 0s it is by... (16 Replies)
Hi,
So awk is driving me crazy on this one. I have searched everywhere and read man, docs and every related post Google can find and still no luck. The actual files I need to run this on are sensitive in nature, but it is the same thing as if I needed to calculate weighted grades for multiple... (15 Replies)
Discussion started by: cotilloe
15 Replies
LEARN ABOUT OSX
locale::codes::langvar
Locale::Codes::LangVar(3pm) Perl Programmers Reference Guide Locale::Codes::LangVar(3pm)NAME
Locale::Codes::LangVar - standard codes for language variation identification
SYNOPSIS
use Locale::Codes::LangVar;
$lvar = code2langvar('acm'); # $lvar gets 'Mesopotamian Arabic'
$code = langvar2code('Mesopotamian Arabic'); # $code gets 'acm'
@codes = all_langvar_codes();
@names = all_langvar_names();
DESCRIPTION
The "Locale::Codes::LangVar" module provides access to standard codes used for identifying language variations, 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 variations. 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:
$lvar = code2langvar('en','alpha-2');
$lvar = code2langvar('en',LOCALE_CODE_ALPHA_2);
The codesets currently supported are:
alpha
This is the set of alphanumeric codes from the IANA language registry, such as 'arevela' for Eastern Armenian.
This code set is identified with the symbol "LOCALE_LANGVAR_ALPHA".
This is the default code set.
ROUTINES
code2langvar ( CODE [,CODESET] )
langvar2code ( NAME [,CODESET] )
langvar_code2code ( CODE ,CODESET ,CODESET2 )
all_langvar_codes ( [CODESET] )
all_langvar_names ( [CODESET] )
Locale::Codes::LangVar::rename_langvar ( CODE ,NEW_NAME [,CODESET] )
Locale::Codes::LangVar::add_langvar ( CODE ,NAME [,CODESET] )
Locale::Codes::LangVar::delete_langvar ( CODE [,CODESET] )
Locale::Codes::LangVar::add_langvar_alias ( NAME ,NEW_NAME )
Locale::Codes::LangVar::delete_langvar_alias ( NAME )
Locale::Codes::LangVar::rename_langvar_code ( CODE ,NEW_CODE [,CODESET] )
Locale::Codes::LangVar::add_langvar_code_alias ( CODE ,NEW_CODE [,CODESET] )
Locale::Codes::LangVar::delete_langvar_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-2012 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.2 2012-10-11 Locale::Codes::LangVar(3pm)