Look at this output !
Though the index starts at 1, there isn't any problem if ' 0 ' is used as it would default to ' 1 '.
and for the date format.
OP had specified that the input file would contain date value of the form YYYYMMDD
then what is the need to explicitly specify the format specifier when we are sure that we are going to extract ' 4 ' digit - ' 2 ' digit - ' 2 ' digit
Hello every one, I have read a little about SED and GREP but I do not know how to do this:
Using SED or GREP:
"reverse all three letter words"
"replace the last two digits in any string of digits by zeros (0)"
"remove lines that start and end with the same word"
and I have more like... (5 Replies)
I am using this command to replace a text string in a data file:
sed -e 's/ab/test2/g' -e 's/abcxyz/test1/g' datafile
datafile contains:
ab
abcxyz
My results:
test2
test2cxyz
I want my results to be:
test2
test1 (7 Replies)
hey all, I have question when am writing simple shell...
in the child am calling execvp, i want the parent to know when execvp returns - 1. how can i let the parent know the result of execvp
thanks in advance (9 Replies)
Greetings all,
...here is yet another string of awk/sed questions from a RegExp-Challenged luser :eek:
I'm looking to have sed/awk do some clean-up on routing tables and to that end, I would like to do the following:
1.) If a line contains the word "masks" or "subnets" prepend CR/LF to... (16 Replies)
1.) I am to write scripts that will be phasetest folder in the home directory.
2.) The folder should have a set-up,phase and display files
I have written a small script which i used to check for the existing users and their password.
What I need help with:
I have a set of questions in a... (19 Replies)
This was mistaken as homework in a different forum, but is not. These are questions that are close to what I am trying to do at work.
QUESTION1:
How do you grep only an exact string. I am using Solaris10 and do not have any GNU products installed.
Contents of car.txt
CAR1_KEY0
CAR1_KEY1... (1 Reply)
This post was previously mistaken for homework, but is actually a small piece of what I working on at work. Please answer if you can.
QUESTION1
How do you grep only an exact string. I am using Solaris10 and do not have any GNU products installed.
Contents of car.txt
CAR1_KEY0
CAR1_KEY1... (2 Replies)
Hi. I have a txt file. I need to make a copy of the lines which are beginning with a mobile phone number, or a fix phone number. I have to copy thoose lines in numbers.txt, after that i have to delete then from the originally file. In numbers.txt i need to write a prefix before each number. if the... (1 Reply)
Hello Experts..
I have 3-4 C codes with Oracle SQL statements embedded. All the SQL statements starts with EXEC SQL keyword and ends with ;. I want to extract all the SQL statements out of these codes.
I did awk '/^EXEC SQL/,/\;/' inputFile (I use this on all of the codes individually). That... (2 Replies)
Discussion started by: juzz4fun
2 Replies
LEARN ABOUT OSX
locale::script
Locale::Script(3pm) Perl Programmers Reference Guide Locale::Script(3pm)NAME
Locale::Script - standard codes for script identification
SYNOPSIS
use Locale::Script;
$script = code2script('phnx'); # 'Phoenician'
$code = script2code('Phoenician'); # 'Phnx'
$code = script2code('Phoenician',
LOCALE_CODE_NUMERIC); # 115
@codes = all_script_codes();
@scripts = all_script_names();
DESCRIPTION
The "Locale::Script" module provides access to standards codes used for identifying scripts, such as those defined in ISO 15924.
Most of the routines take an optional additional argument which specifies the code set to use. If not specified, the default ISO 15924
four-letter codes will be used.
SUPPORTED CODE SETS
There are several different code sets you can use for identifying scripts. 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:
$script = code2script('phnx','alpha');
$script = code2script('phnx',LOCALE_SCRIPT_ALPHA);
The codesets currently supported are:
alpha, LOCALE_SCRIPT_ALPHA
This is a set of four-letter (capitalized) codes from ISO 15924 such as 'Phnx' for Phoenician. It also includes additions to this set
included in the IANA language registry.
The Zxxx, Zyyy, and Zzzz codes are not used.
This is the default code set.
num, LOCALE_SCRIPT_NUMERIC
This is a set of three-digit numeric codes from ISO 15924 such as 115 for Phoenician.
ROUTINES
code2script ( CODE [,CODESET] )
script2code ( NAME [,CODESET] )
script_code2code ( CODE ,CODESET ,CODESET2 )
all_script_codes ( [CODESET] )
all_script_names ( [CODESET] )
Locale::Script::rename_script ( CODE ,NEW_NAME [,CODESET] )
Locale::Script::add_script ( CODE ,NAME [,CODESET] )
Locale::Script::delete_script ( CODE [,CODESET] )
Locale::Script::add_script_alias ( NAME ,NEW_NAME )
Locale::Script::delete_script_alias ( NAME )
Locale::Script::rename_script_code ( CODE ,NEW_CODE [,CODESET] )
Locale::Script::add_script_code_alias ( CODE ,NEW_CODE [,CODESET] )
Locale::Script::delete_script_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.unicode.org/iso15924/
Home page for ISO 15924.
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) 1997-2001 Canon Research Centre Europe (CRE).
Copyright (c) 2001-2010 Neil Bowers
Copyright (c) 2010-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::Script(3pm)