Sponsored Content
Top Forums Shell Programming and Scripting AWK to separate numbers from logs Post 302349529 by Franklin52 on Tuesday 1st of September 2009 07:21:20 AM
Old 09-01-2009
One way:

Code:
awk '/[Ee]stimated/ {sub("\(","",$5);print int($5)}' file

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

how to separate numbers and words from a file using shell scripts

Hi, How to separate numbers and words(with full alphabets) in a particular file and store it in two different files. Please help me out for this.Using shell scripting. :confused::confused: (1 Reply)
Discussion started by: kamakshi s
1 Replies

2. Shell Programming and Scripting

awk command to separate a field

I have a log file that I am trying to convert. File contents something like this: aaaaa bbbbbb cccc dddddd\123 eeeee ffffffff I am trying to output the fields in a different order and separate field 4 so that the "123" and "dddddd" can be output separately. for example bbbbbb aaaaa 123... (5 Replies)
Discussion started by: jake1988
5 Replies

3. Shell Programming and Scripting

separate numbers in a file

I have this command in a shl (UNIX) to find the lates file that start with EMT in a directory file=$(ls -tr $EMT*.dat | tail -1) # Select the latest file It finds: EMT345.dat then I have to be able to separate EMT AND the numbers 345 and stored 345 in a variable and incremented, so my new... (7 Replies)
Discussion started by: rechever
7 Replies

4. Shell Programming and Scripting

separate two numbers separated by :

Hi all i have a data of this form 10.12.4.22:138 10.12.2.50:137 10.20.2.24:1027 10.12.2.44:138 10.12.2.44:137 10.0.4.38:58871 10.13.3.19:138 i need to separate the number out which is at the last and after ':' Please help me out Thanx in advance (5 Replies)
Discussion started by: vaibhavkorde
5 Replies

5. Shell Programming and Scripting

Awk variable in a separate file

Hi all, I have a requirement to put all the varibles used in an awk command in a separate file. This is because i have arround 100 variables used in an awk command. So i want to put all the variables used for the awk command in a separate file. Please help me on this. Thanks in adv. (6 Replies)
Discussion started by: gani_85
6 Replies

6. Shell Programming and Scripting

Separate two numbers

I would like to separate number by space so that 121231212 222111212 would be 1 2 1 2 3 1 2 1 2 2 2 2 1 1 1 2 1 2 Thanks! (2 Replies)
Discussion started by: johnkim0806
2 Replies

7. Shell Programming and Scripting

Help awk/sed: putting a space after numbers:to separate number and characters.

Hi Experts, How to sepearate the list digit with letters : with a space from where the letters begins, or other words from where the digits ended. file 52087mo(enbatl) 52049mo(enbatl) 52085mo(enbatl) 25051mo(enbatl) The output should be looks like: 52087 mo(enbatl) 52049... (10 Replies)
Discussion started by: rveri
10 Replies

8. Shell Programming and Scripting

Line numbers and exception to be caught in logs

Hi Folks, I have just basic queries is that suppose I have to monitor the logs then there is a command , suppose I have to monitor the abc.log which is updating dynamically within seconds so the command will be after going to that directory is .. tail -f abc.log Now please advise what about... (1 Reply)
Discussion started by: punpun66
1 Replies

9. Shell Programming and Scripting

Csv file separate using awk

Hi, I have file like below apple,orange,pineapple,pappya,guva,avocado want to store as apple orange pineapple pappya I tried below command to seprate first field command1: (3 Replies)
Discussion started by: stew
3 Replies

10. Shell Programming and Scripting

awk separate files to one directory

I am trying to output all files that are made by this awk to a specific directory. awk -F '' '{f = $3 ".txt"; print > f}' input.txt Since the actual data has several hundred files I redirect the output (well tried to) to a directory. awk -F '' '{f = $3 ".txt"; close($3 ".txt")} print >... (6 Replies)
Discussion started by: cmccabe
6 Replies
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-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::LangFam(3pm)
All times are GMT -4. The time now is 08:35 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy