06-02-2009
what have you tried? you have already know about awk and shell scripting in your previous posts...so show some code...
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Perl file::find can I sort the out put
I am using file::find in my script but how I wish to process each file found in date order.
Can I sort this module?
eg
part of current script is....
use File::Find;
# Recursively find all files and directories in $mqueue_directory
find(\&wanted,... (2 Replies)
Discussion started by: Andrek
2 Replies
2. UNIX for Dummies Questions & Answers
{ printf "%s %6.2f\n", UserName, pay > payroll_report | sort -nk2 payroll_report; }
this is what I have but it doesnt write the payroll_report file and gives a syntax error for the pipe...help?? (2 Replies)
Discussion started by: knc9233
2 Replies
3. Shell Programming and Scripting
hi
I am doing a task that is i have to search for multiple pattern from a file's 9 th column and then redirect it to a new file
awk -F, 'BEGIN {OSF=","} { if ($9 == "OTF") print $0}' test1.tsv > test.tsv
and the patterns are OST. ODI,MIN LIKE OTF
Bit not getting the desired output... (11 Replies)
Discussion started by: pranabrana
11 Replies
4. Shell Programming and Scripting
Hello,
Is there any way in awk to put every line of a file in an array and so we can like this print the line we want.
For example, if we have this file
aaa eee
bbb fff
ccc ggg
ddd hhh
So we can print to the output the 3rd line only
ccc ggg
If it is possible, please put the... (7 Replies)
Discussion started by: rany1
7 Replies
5. Shell Programming and Scripting
I have 2 files as follows:
filename1: :
6742 /welcome/mundial98_ahf1_404.htm 1020
6743 /welcome/mundial98_ahf1_404.htm 2224
6744 /welcome/mundial_ef1_404.htm 21678
6745 /welcome/mundial_if_404.htm 4236
6746 /welcome/mundial_lf1_404.htm 21678
filename2:
6746 894694763 1... (2 Replies)
Discussion started by: jontjioe
2 Replies
6. Shell Programming and Scripting
I'd like to copy strings from a log file and put them into a CSV.
The strings could be on different line numbers, depending on size of log.
Example Log File:
File = foo.bat
Date = 11/11/11
User = Foo Bar
Size = 1024
...
CSV should look like:
"foo.bat","11/11/11","Foo Bar","1024" (7 Replies)
Discussion started by: chipperuga
7 Replies
7. Solaris
Hello every one ,
I am just trying to sort df -h out in a particular order to differentiate SAN disks and local disks .. does any body have any script or any useful command ??
thanks in advance .. (8 Replies)
Discussion started by: new2uniks
8 Replies
8. Shell Programming and Scripting
Hi All, Need Suggestion, Want to sort a file using awk & sed to get required, output as below, such that each LUN shows correct WWPN and FA port Numbers correctly:
Required output:
01FB 10000000c97843a2 8C 0
01FB 10000000c96fb279 9C 0
22AF 10000000c97843a2 8C 0
22AF 10000000c975adbd ... (10 Replies)
Discussion started by: aix_admin_007
10 Replies
9. Shell Programming and Scripting
I have a problem with my homework I need to create a shell script using #!bin/awk -f
the script will output the file in an alphabetical order only words and after the word is : after that a space then , then it will be numbered each character by which line its been for example
CB
92A
A... (1 Reply)
Discussion started by: collapse
1 Replies
10. Shell Programming and Scripting
I have file and process it and provide clean output.
input file
Device Symmetrix Name : 000A4
Device Symmetrix Name : 000A5
Device Symmetrix Name : 000A6
Device Symmetrix Name : 000A7
Device Symmetrix Name : 000A8
Device Symmetrix Name : 000A9
Device Symmetrix Name ... (10 Replies)
Discussion started by: ranjancom2000
10 Replies
LEARN ABOUT PHP
geoip_time_zone_by_country_and_region
GEOIP_TIME_ZONE_BY_COUNTRY_AND_REGION(3) 1 GEOIP_TIME_ZONE_BY_COUNTRY_AND_REGION(3)
geoip_time_zone_by_country_and_region - Returns the time zone for some country and region code combo
SYNOPSIS
string geoip_time_zone_by_country_and_region (string $country_code, [string $region_code])
DESCRIPTION
The geoip_time_zone_by_country_and_region(3) function will return the time zone corresponding to a country and region code combo.
In the United States, the region code corresponds to the two-letter abbreviation of each state. In Canada, the region code corresponds to
the two-letter province or territory code as attributed by Canada Post.
For the rest of the world, GeoIP uses FIPS 10-4 codes to represent regions. You can check http://www.maxmind.com/app/fips10_4 for a
detailed list of FIPS 10-4 codes.
This function is always available if using GeoIP Library version 1.4.1 or newer. The data is taken directly from the GeoIP Library and not
from any database.
PARAMETERS
o $country_code
- The two-letter country code (see geoip_country_code_by_name(3))
o $region_code
- The two-letter (or digit) region code (see geoip_region_by_name(3))
RETURN VALUES
Returns the time zone on success, or FALSE if the country and region code combo cannot be found.
EXAMPLES
Example #1
A geoip_time_zone_by_country_and_region(3) example using region code for US/Canada
This will print the time zone for country CA (Canada), region QC (Quebec).
<?php
$timezone = geoip_time_zone_by_country_and_region('CA', 'QC');
if ($timezone) {
echo 'Time zone for CA/QC is: ' . $timezone;
}
?>
The above example will output:
Time zone for CA/QC is: America/Montreal
Example #2
A geoip_time_zone_by_country_and_region(3) example using FIPS codes
This will print the time zone for country JP (Japan), region 01 (Aichi).
<?php
$timezone = geoip_time_zone_by_country_and_region('JP', '01');
if ($timezone) {
echo 'Time zone for JP/01 is: ' . $timezone;
}
?>
The above example will output:
Time zone for JP/01 is: Asia/Tokyo
PHP Documentation Group GEOIP_TIME_ZONE_BY_COUNTRY_AND_REGION(3)