10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
OS : RHEL 6.8
Shell : bash
I want to remove all lines like below from the history output as it has password.
$ history | grep sqlplus
239 sqlplus jn_usr/dxc825#@10.5.12.106/OCSGPD
256 sqlplus osb_soa/KD1egM09@10.5.12.196/BSOAPRD
279 sqlplus jn_usr/dxc825#@10.80.16.219/OCSGPD... (5 Replies)
Discussion started by: John K
5 Replies
2. UNIX for Beginners Questions & Answers
HI Folks -
I'm very frustrated - I'm trying to execute a verys imple for loop and rename the files if they exist.
here is my loop :
ydate=`TZ=aaa24 date +%m%d`
CR_YR=$(date "+%Y")
echo $ydate
echo ${CR_YR}
cd... (6 Replies)
Discussion started by: SIMMS7400
6 Replies
3. Shell Programming and Scripting
Hi,
i have a source file and have 3 columns and separated by "|" .i want to split this 3 columns in different variable.When i am executing this values indivisually giving correct result but when the same execute inside a for loop,it's giving issues.
Src file(jjj.txt)
-------... (8 Replies)
Discussion started by: raju2016
8 Replies
4. UNIX for Beginners Questions & Answers
I'm a complete beginner in UNIX (and not a computer science student either), just undergoing a tutoring course. Trying to replicate the instructions on my own I directed output of the ls listing command (lists all files of my home directory ) to My_dir.tsv file (see the screenshot) to make use of... (9 Replies)
Discussion started by: scrutinizerix
9 Replies
5. UNIX for Dummies Questions & Answers
Hello,
I'm using cygwin on my Windows 7 machine.
From the man pages of cut:
--output-delimiter=STRING
use STRING as the output delimiter the default is to use the input delimiter
I tried the following commands and got the error messages:
$ cut -c1-10,20-30 -d... (10 Replies)
Discussion started by: kojac
10 Replies
6. Shell Programming and Scripting
Hi
Can anyone what I am doing wrong while using cut command.
for f in *.log
do
logfilename=$f
Log "Log file Name: $logfilename"
logfile1=`basename $logfilename .log`
flength=${#logfile1}
Log "file length $flength"
from_length=$(($flength - 15))
Log "from... (2 Replies)
Discussion started by: dgmm
2 Replies
7. UNIX for Dummies Questions & Answers
Hi Forum
Im having problem with cut it even when i cut a field from an input file
eg
echo $x | cut -f1 -d':'
it doesnt read the whole line if there is a space in it
eg
thisLineHasA SpaceInIt
:wall:
it only read up to the space.What i want is so the it cut the field as one line ... (8 Replies)
Discussion started by: ShinTec
8 Replies
8. Shell Programming and Scripting
how to traverse through each directory (1 Reply)
Discussion started by: Reddy482
1 Replies
9. UNIX for Dummies Questions & Answers
I have a function "MyPrint" that runs great on a file (BaseData.txt) that has one line of data. If i add rows to the text file it's reading the tFile variable becomes a list of every field 2 in the file. To correct this, i tried to call the function from a loop where i read one line at a time and... (4 Replies)
Discussion started by: KME
4 Replies
10. Shell Programming and Scripting
Hi,
In the following bash code rather than cutting at a predefined character I would like to cut at position i (i var from loop).
Is this possible? I have tried eval, but either it's not possible or my syntax is wrong.
thanks
Nick
for i in {1..9}
do
theChar=$(echo... (3 Replies)
Discussion started by: de_la_espada
3 Replies
Geo::GoogleEarth::Pluggable(3pm) User Contributed Perl Documentation Geo::GoogleEarth::Pluggable(3pm)
NAME
Geo::GoogleEarth::Pluggable - Generates GoogleEarth Documents
SYNOPSIS
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new(%data); #is a special Folder...
my $folder =$document->Folder(%data); #isa Geo::GoogleEarth::Pluggable::Folder
my $point =$document->Point(%data); #isa Geo::GoogleEarth::Pluggable::Point
my $netlink =$document->NetworkLink(%data); #isa Geo::GoogleEarth::Pluggable::NetworkLink
my $lookat =$document->LookAt(%data); #isa Geo::GoogleEarth::Pluggable::LookAt
my $style =$document->Style(%data); #isa Geo::GoogleEarth::Pluggable::Style
print $document->render;
KML CGI Example
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new(name=>"KML Document");
print $document->header,
$document->render;
KMZ CGI Example
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new(name=>"KMZ Document");
print $document->header_kmz,
$document->archive;
DESCRIPTION
Geo::GoogleEarth::Pluggable is a Perl object oriented interface that allows for the creation of XML documents that can be used with Google
Earth.
Geo::GoogleEarth::Pluggable (aka Document) is a Geo::GoogleEarth::Pluggable::Folder with a render method.
Object Inheritance Graph
-- Base --- Folder --- Document
|
+- Placemark -+- Point
| +- LineString
| +- LinearRing
|
+- StyleBase -+- Style
| +- StyleMap
|
+- NetworkLink
USAGE
This is all of the code you need to generate a complete Google Earth document.
use Geo::GoogleEarth::Pluggable;
my $document=Geo::GoogleEarth::Pluggable->new;
$document->Point(name=>"White House", lat=>38.897337, lon=>-77.036503);
print $document->render;
CONSTRUCTOR
new
my $document=Geo::GoogleEarth::Pluggable->new(name=>"My Name");
METHODS
type
Returns the object type.
my $type=$folder->type;
document
Returns the document object.
All objects know to which document they belong even the document itself!
render
Returns an XML document with an XML declaration and a root name of "Document"
print $document->render;
archive
Returns a KMZ formatted Zipped archive of the XML document
print $document->archive;
xmlns
Add or update a namespace
$document->xmlns->{"namespace"}=$url;
Delete a namespace
delete($document->xmlns->{"xmlns:gx"});
Replace all namespaces
$document->{"xmlns"}={namespace=>$url};
Reset to default namespaces
delete($document->{"xmlns"});
nextId
This method is in the document since all Styles and StyleMaps are in the document not folders.
my $id=$document->nextId($type); #$type in "Style" or "StyleMap"
header, header_kml
Returns a header appropriate for a web application
Content-type: application/vnd.google-earth.kml+xml
Content-Disposition: attachment; filename=filename.xls
$document->header #embedded in browser
$document->header(filename=>"filename.xls") #download prompt
$document->header(content_type=>"application/vnd.google-earth.kml+xml") #default content type
header_kmz
Returns a header appropriate for a web application
Content-type: application/vnd.google-earth.kml+xml
Content-Disposition: attachment; filename=filename.xls
$document->header_kmz #embedded in browser
$document->header_kmz(filename=>"filename.xls") #download prompt
$document->header_kmz(content_type=>"application/vnd.google-earth.kmz") #default content type
TODO
Support for default Polygon and Line styles that are nicer than GoogleEarth's
Support for DateTime object in the constructor that is promoted to the LookAt object.
Create a GPS::Point plugin (Promote tag as name and datetime to LookAt)
BUGS
Please log on RT and send to the geo-perl email list.
LIMITATIONS
Not So Pretty XML
The XML produced by XML::LibXML is not "pretty". If you need pretty XML you must pass the output through xmllint or a simular product.
For example:
perl -MGeo::GoogleEarth::Pluggable -e "print Geo::GoogleEarth::Pluggable->new->render" | xmllint --format -
Write Only
This package can only write KML and KMZ files. However, if you need to read KML files, please see the Geo::KML package's "from" method.
SUPPORT
DavisNetworks.com supports all Perl applications including this package.
AUTHOR
Michael R. Davis (mrdvt92)
CPAN ID: MRDVT
COPYRIGHT
This program is free software licensed under the...
The BSD License
The full text of the license can be found in the LICENSE file included with this module.
SEE ALSO
Geo::KML, XML::LibXML, XML::LibXML::LazyBuilder, Archive::Zip, IO::Scalar
perl v5.14.2 2011-06-25 Geo::GoogleEarth::Pluggable(3pm)