Hi all!
I need a little help with an imbedded fuction I am trying to write. What I am trying to do is go to a series of hosts and get the contents of an XML file, storing some of the data, along with the name of the host it was gathered from. My intent is to store this in an array for later... (1 Reply)
Hi,
I would like to use a power function in Bash in an awk '{ } .
e.g pow(2,3)=8
Any suggestion? I try to find online resources but most of them stated by using BC.
Please advise. Thanks. (3 Replies)
I want to have a function with a similar interface:
search *.cpp asdf
that will search recursively all directories for *.cpp file, containing line 'asdf' inside. I tried this:
function search { find . -name "$1" | xargs grep -li $2; }
But it doesn't work all the time. For example, if i run it... (3 Replies)
Hey everyone.
I am currently testing my first function based BASH script. The ultimate goal is going to be moving logs from point A to point B (or if B is down, to point C).
Part of this involves the following function:
function testAlive{
ping -c 1 -q $1
}
Now when I run ping -c... (1 Reply)
I have trouble getting this logic to work
#!/bin/bash
function assign_var(){
while
do
read -p "$2 :" $3
done
}
assign_var '$IPADDRESS' ipaddress IPADDRESS
Basicly, i want to make sure that entry is made (i can add more sophisticated checks later), but the idea is to recycle... (11 Replies)
This is probably common knowledge to the professionals but not so much for amateurs like
myself.
This is a code snippet for the equivalent of BASIC's...
LET char$=INKEY$
As the timeout parameter cannot be less than 1 second then this is the only limitation...
It is a single line... (5 Replies)
I am putting this thread to shell-threads, because it is about how to make a function work properly. I need a hint for declaring a function right, it has been more than a year I did not work that straight with bash.
So my aim is to turn off the eth0 (as it would be in linux, and bge0 in bsd ),... (2 Replies)
I am trying to figure out why I am having a "problem" with some functions in a bash script I am running. The reason for air quoting is that the functions are working, they are just not displaying anything to screen when called from another function. Here's an example:
function Create_Input
{... (6 Replies)
Hi all,
This is my first day on Linux shell!!!
So, I am trying to write a script that that will pick up pairs of files with the same name (not the same content) but that are different in one character (one is *R1 the other is *R2)...
Something like: look ate the files, whenever they are the... (3 Replies)
Discussion started by: ALou
3 Replies
LEARN ABOUT CENTOS
locale::codes::langext
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)