10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
So, i have this requirement where i need to check the file format, whether it's EBCDIC or ASCII, and based on format retrieve the information from that file:
my file is:
file1.txt-->this ebcdic file
file2.txt-->ascii file
i tried below code:
file=file1.txt
type="`file $file`"
i get... (7 Replies)
Discussion started by: gnnsprapa
7 Replies
2. UNIX for Beginners Questions & Answers
Hi Team,
I am having 100 EBCDIC files (i.e. DAT extension) and need to convert them into ASCII File by unix shell script.
I tried with DD Command but its not providing output as expected.
Sample Text:
------------------
גהאבדוחס@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Expected Output:... (2 Replies)
Discussion started by: JSM
2 Replies
3. UNIX for Dummies Questions & Answers
Is there any command to eliminate Header and footer from EBCDIC file (4 Replies)
Discussion started by: abhilashnair
4 Replies
4. Shell Programming and Scripting
Hi all,
i have a task to do with Python and because i'm a beginner on it i would like your help on this.
Create a python script that:
Every hour collect the Temperature (e.g. 29C) and Current Condition (e.g. Clear) from this website wunderground.com/global/stations/54511.html
Create a CSV... (0 Replies)
Discussion started by: ragaga123
0 Replies
5. Red Hat
Hello all,
To give you all a little bit of background. We recently migrated from HP-UX to Redhat Linux and one of the command I used to run on HP-UX to convert an EBCDIC file to ASCII file isn't working on Linux. The code is as follow:
cat workout2.dat | dd cbs=250 conv=block conv=ascii... (3 Replies)
Discussion started by: sethmj
3 Replies
6. HP-UX
Hi guys!
My sql*plus program generating dat file. so this dat file i want to write in destination sever path with ebcdic formate through SFTP only, because my destination server is mainframe it can read only ebcdic formate files only.
could you please help on this........
i was written... (3 Replies)
Discussion started by: sgangadhar19
3 Replies
7. Shell Programming and Scripting
Hi,
is there a way to check if the initial few characters are ebcdic or ascii in a file? (1 Reply)
Discussion started by: ahmedwaseem2000
1 Replies
8. Linux
Hi,
Hi want to check weather a file is being used by using a command or java code or shell script.
So, can any body give me some idea..
Thanks
Buddhika (3 Replies)
Discussion started by: cse.buddhika
3 Replies
9. Shell Programming and Scripting
I think I can do this myself now, but I am always amazed by how people can do things cleaner and simpler than I end up doing...
Using cron, I want to save the image found at:
http://radar.weather.gov/ridge/Conus/RadarImg/centgrtlakes.gif
every 15 minutes to a local file , such as
... (1 Reply)
Discussion started by: brucewestfall
1 Replies
10. Shell Programming and Scripting
Dear All
I want to do following task. Kindly suggest.
In my script every hour one file is genarated. say xyz.txt.
Now if this file contain some data then i want to do task A and if file is blank then i want to do nothing.
Kindly help me to do this.
regards
jaydeep (5 Replies)
Discussion started by: jaydeep_sadaria
5 Replies
Weather::Com::Location(3pm) User Contributed Perl Documentation Weather::Com::Location(3pm)
NAME
Weather::Com::Location - class representing one location and its weather
SYNOPSIS
#!/usr/bin/perl -w
use Weather::Com::Finder;
# you have to fill in your ids from weather.com here
my $PartnerId = 'somepartnerid';
my $LicenseKey = 'mylicense';
my %weatherargs = (
'partner_id' => $PartnerId,
'license' => $LicenseKey,
);
my $finder = Weather::Com::Finder->new(%weatherargs);
# if you want an array of locations:
my @locations = $finder->find('Heidelberg');
# or if you prefer an arrayref:
my $locations = $finder->find('Heidelberg');
foreach my $location (@locations) {
print "Found weather for city: ", $location->name(), "
";
print "The city is located at: ", $location->latitude(), "deg N, ",
$location->longitude(), "deg E
";
print "Local time is ", $location->localtime()->time(), "
";
print "Sunrise will be/has been at ", $location->sunrise()->time(), "
";
}
DESCRIPTION
Using Weather::Com::Location objects is the way to access weather (and some location) information for one specific location (city).
You get Weather::Com::Location objects by using a finder object (see Weather::Com::Finder).
Weather::Com::Location is a subclass of Weather::Com::Cached. An instance of this class will update itself corresponding to the caching
rules any time one of its methods is called.
CONSTRUCTOR
new(hash or hashref)
The constructor will usually not be used directly because you get ready to use location objects by using a finder.
If you ever want to instantiate location objects on your own, you have to provide the same configuration hash or hashref to the constructor
you usually would provide to the "new()" method of Weather::Com::Finder. In addition it is necessary to add a hash element "location_id"
to this config hash. The "location_id" has to be a valid weather.com location id.
METHODS
id()
Returns the location id used to instantiate this location.
name()
Returns the name of the location as provided by weather.com.
current_conditions()
Returns a Weather::Com::CurrentConditions object containing the current conditions of the location.
The Weather::Com::CurrentConditions object is instantiated with the first call of the "current_conditions()" method.
Please refer to Weather::Com::CurrentConditions for further details.
forecast()
Returns a Weather::Com::Forecast object.
Please refer to Weather::Com::Forecast for further details.
latitude()
Returns the latitude of the location.
longitude()
Returns the longitude of the location.
localtime()
Returns a Weather::Com::DateTime object containing the local time of the location.
This value is evaluated each time you call this method. We do not use the value returned from weather.com here because it does not make any
sence to use a cached value to show the current time.
localtime_ampm()
This method is deprecated and will be removed with the next release!
Returns the local time of the location.
The time is returned in the format "hh:mm [AM|PM]". To get a 24 hour format use "localtime" instead.
Sample: 10:30 PM
sunrise()
Returns a Weather::Com::DateTime object containing the time of sunrise.
sunrise_ampm()
This method is deprecated and will be removed with the next release!
Returns the time of sunrise in 12 hour format (see "localtime_ampm()" for details).
sunset()
Returns a Weather::Com::DateTime object containing the time of sunset.
sunset_ampm()
This method is deprecated and will be removed with the next release!
Returns the time of sunset in 12 hour format (see "localtime_ampm()" for details).
timezone()
Returns the timezone offset to GMT (without respecting daylight savings time).
units()
Returns a Weather::Com::Units object.
Please refer to Weather::Com::Units for further details.
SEE ALSO
See also documentation of Weather::Com, Weather::Com::CurrentConditions, Weather::Com::Units.
AUTHOR
Thomas Schnuecker, <thomas@schnuecker.de>
COPYRIGHT AND LICENSE
Copyright (C) 2004-2007 by Thomas Schnuecker
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The data provided by weather.com and made accessible by this OO interface can be used for free under special terms. Please have a look at
the application programming guide of weather.com (http://www.weather.com/services/xmloap.html)
perl v5.8.8 2007-07-09 Weather::Com::Location(3pm)