Hi,
I'm a total beginner at awk and hope someone can advise what I have done wrong in the following script:
I have a file which (to simplify things) may be something like this
Fred Smith and Sue Brown
Joe Jones and Jane Watts
Sally Green and Jim O?
Connor
Freda O?
Reiley and Pat O?... (2 Replies)
Trying to write an if statement, which calls2 or 3 functions from within it.
code:
{if (($34 != "") && (NR != 1) && ($1 != "F"))
less_than(34, 0, "S1002a")
is_number(34,"S1002a")
}
But this is only treating the first function call, as part of the if.
and always executes is_number.... (1 Reply)
Hello,
I'm trying to use awk to print lines that match a regular expression.
I am using awk to print a record only if it contains N/A.
awk '/N/A/ {print $1}'
When executed the script returns "awk syntax error near line 1".
If I use /N//A/ it prints all records containing a "/", not... (2 Replies)
Hi ,
I have a simple question in awk, i have long string which i am getting for a grep command. the output contains 50 fields.
I need to display like first 5 fileds in a line and rest of all fields in the next line.
{ for(i=5;i<NF;++i) s= $i; print $1,$2,$3,$4,$5,"\n",$s}
Is the above... (1 Reply)
I have a file
CREATE TABLE DDD_EXT --- 1000
(
val u1
val u1
);
CREATE TABLE dsdasd_EXT --- 1323
(
val u1
val u1
);
CREATE TABLE AAAAAA_EXT --- 1222
(
val u1
val u1
);
CREATE TABLE E_EXT --- 11
(
val u1
val u1 (2 Replies)
Hi,
Probably a very weak question.. but I have tried all I know..
BPC0001:ANNUL_49542 0.0108 -0.0226 -0.0236 0.0042 0.0033 -0.0545 0.0376 0.0097 -0.0093 -0.032 Control
BPC0002:ANNUL_49606 0.0190 -0.0142 -0.0060 -0.0217 -0.0027 ... (3 Replies)
Can anyone tell me please what the "+" is doing in this awk command?
find / -user smith -type f -ls | awk '{ sum += $7 } END {print sum }'
Thanks,
George (2 Replies)
Hi All,
A very silly question:
How to just print the integer attached a particular string in a line by awk?
Ex:
Happy_world_foo123...So i just want the value 123 to be printed on the line where we have string "foo".
Thanks (16 Replies)
I have what a think is a simple question but I'm just a beginner in scripting. I'm my unix command line I run a date command that returns the following:
Wed Apr 3 10:39:30 EDT 2013
How do I awk out the "10" only in awk? Or is awk the way to do it or is there a better way? (7 Replies)
Here is an awk line I have in a bigger script that checks to see if nimsh process is running and does couple other things based on the output and runs on all servers.
ps -ef|grep -i nimsh|awk '{print $9}' and I am expecting output to be "/usr/sbin/nimsh"
I find that on some servers... (4 Replies)
Discussion started by: kvosu
4 Replies
LEARN ABOUT MOJAVE
locale::codes::langfam
Locale::Codes::LangFam(3pm) Perl Programmers Reference Guide Locale::Codes::LangFam(3pm)NAME
Locale::Codes::LangFam - standard codes for language extension identification
SYNOPSIS
use Locale::Codes::LangFam;
$lext = code2langfam('apa'); # $lext gets 'Apache languages'
$code = langfam2code('Apache languages'); # $code gets 'apa'
@codes = all_langfam_codes();
@names = all_langfam_names();
DESCRIPTION
The "Locale::Codes::LangFam" module provides access to standard codes used for identifying language families, such as those as defined in
ISO 639-5.
Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 639-5
language family codes will be used.
SUPPORTED CODE SETS
There are several different code sets you can use for identifying language families. 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 = code2langfam('apa','alpha');
$lext = code2langfam('apa',LOCALE_LANGFAM_ALPHA);
The codesets currently supported are:
alpha
This is the set of three-letter (lowercase) codes from ISO 639-5 such as 'apa' for Apache languages.
This is the default code set.
ROUTINES
code2langfam ( CODE [,CODESET] )
langfam2code ( NAME [,CODESET] )
langfam_code2code ( CODE ,CODESET ,CODESET2 )
all_langfam_codes ( [CODESET] )
all_langfam_names ( [CODESET] )
Locale::Codes::LangFam::rename_langfam ( CODE ,NEW_NAME [,CODESET] )
Locale::Codes::LangFam::add_langfam ( CODE ,NAME [,CODESET] )
Locale::Codes::LangFam::delete_langfam ( CODE [,CODESET] )
Locale::Codes::LangFam::add_langfam_alias ( NAME ,NEW_NAME )
Locale::Codes::LangFam::delete_langfam_alias ( NAME )
Locale::Codes::LangFam::rename_langfam_code ( CODE ,NEW_CODE [,CODESET] )
Locale::Codes::LangFam::add_langfam_code_alias ( CODE ,NEW_CODE [,CODESET] )
Locale::Codes::LangFam::delete_langfam_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.loc.gov/standards/iso639-5/id.php
ISO 639-5 .
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.18.2 2013-11-04 Locale::Codes::LangFam(3pm)