03-23-2014
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello all
i have big test file that has allot of structure text something like this :
<foo1 *.html>
<blah action>
somthing 1
somthing 2
</blah>
</foo1 >
now i will like to insert 2 more lines of text below the <blah action>
so it will be like :
<foo1... (1 Reply)
Discussion started by: umen
1 Replies
2. Shell Programming and Scripting
All,
I'm a newbie at shell scripting and regular expressions and I just need to take a file that's arranged like the one below, remove all leading and trailing whitespace and add a line break after each word. I've been able to remove a few spaces using various awk, sed and Perl scripts, but... (7 Replies)
Discussion started by: moose1
7 Replies
3. UNIX for Dummies Questions & Answers
Greetings
I need to replace "whitespace" in a file with the newline character aka carriage return
My command is either wrong or not interpreted properly by me shell
sed s/" "/\\n" "/g nets > nets1
or
sed s/" "/\n" "/g nets > nets1
nets (input file)
13MHZ_IN... (4 Replies)
Discussion started by: awk_sed_hello
4 Replies
4. Shell Programming and Scripting
Hi
Following is an example line.
echo "192.22.22.22 \"33dffwef\" 200 300 dsdsd" | sed "s:\(\ *\ \):\1:"
I want it's output to be
200
However this is not the case. Can you tell me how to do it? I don't want to use AWK for this. Secondly, how can i fetch just 300? Should I use "\2"... (3 Replies)
Discussion started by: shahanali
3 Replies
5. Shell Programming and Scripting
...when the lines use both a colon and commas to separate the parts you want read as information.
The first version of this script used cut and other non-Bash-builtins, frequently, which made it nice and zippy with little more than average processor load in GNOME Terminal but, predictably, slow... (2 Replies)
Discussion started by: SilversleevesX
2 Replies
6. Shell Programming and Scripting
I cannot seem to get this to work..
I have a file which has about 100 lines, and there is no end of line (line break \n) at the end of each line, and this is causing problem when i paste them into an application.
the file looks like this
this is a test
that is a test
balblblablblhblbha... (1 Reply)
Discussion started by: fedora
1 Replies
7. UNIX for Dummies Questions & Answers
Hi All.
How can I convert this:
ABC_1_1
ABC_1_2
ABC_1_3
into this:
ABC_1 1
ABC_1 2
ABC_1 3
I tried this command but it is not working:
awk '{sub(/+$/,"\t", $1)}{print}'
Any suggestions on how to fix this?
Thank you :wall:
Please use code tags when posting data and... (3 Replies)
Discussion started by: danieladna
3 Replies
8. UNIX for Dummies Questions & Answers
Hi all,
I have this:
begin data;
dimensions nind=168 nloci=6;
info
BDT001.4 ( 1 , 1 ) ( 1 , 12 )
BDT003.4 ( 1 , 1 ) ( 12 , 12 )
BDT007.4 ( 1 , 1 ) ( 12 , 12 )
BDT009.4 ( 1 , 32 ) ( 12 , 22 )
etc, etc
And need this:
begin data;
dimensions nind=168 nloci=6;
info
... (2 Replies)
Discussion started by: MDeBiasse
2 Replies
9. Shell Programming and Scripting
Hello everyone!
I'm trying to make the below file1 look like file2, can anyone help?
Basically I just hit backspace on every line that starts with a number.
Thanks!
file1:
THIS#IS-IT1
4
THIS#IS-IT2
3
THIS#IS-IT3
2
THIS#IS-IT4
1
Result > file2: (4 Replies)
Discussion started by: demmel
4 Replies
10. Shell Programming and Scripting
Hello is it possible with awk or sed to replace any white space with the previous line characters in the same position?
I am asking this because the file I have doesn't always follow a pattern.
For example the file I have is the result of a command to obtain windows ACLs:
icacls C:\ /t... (5 Replies)
Discussion started by: nakaedu
5 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)