Not knowing how to deduct the interface type from your data, and leaving all fancy table formatting to you, this could be a good starting point for you:
Hi,
I have script which generates the output as below:
Jobname Date Time Status
abc 12/9/11 17:00 Completed
xyz 13/9/11 21:00 Running
I have the output as a text file. I need to convert it into a HTML Table and sent it thru email
... (6 Replies)
Hello,
I need help with a perl script that will process a text file and match virtual server name to profile(s). the rest will be ignored.
Virtual server name follows the word "virtual" in the begging of the line.
There could be multiple profiles assigned to one virtual server.
For example, ... (3 Replies)
Friends,
I am trying to convert my local server timezone EST to UTC and for which I used the TZ command, see below
$ date
Thu Dec 6 10:14:14 EST 2012
$
$ TZ=UTC date -d '10:14 EST'
Thu Dec 6 15:14:00 UTC 2012
Now I would like to have the same output in 'yyyymmdd hh:mm' format.
... (4 Replies)
I have one script which generate file called report.txt having following output
parameter_name status comment
banking ok NA
finance 30% hike NA
Loan_department ok 20%
HR_Group defaulters Ajay
I wanted to convert this file into tabular form.
You can see each line contain 3 words and... (7 Replies)
Hi Friends,
I have the script output like below:
Script Output:
-----------------------------------------------------------------------
Details of the Client:
-----------------------
name: server1;
save set: All;
... (3 Replies)
My concnern related to the post
-Convert shell script output txt file to html table,
in this how to print the heading as color.
awk 'BEGIN{print "<table>"} {print "<tr>";for(i=1;i<=NF;i++)print "<td>" $i"</td>";print "</tr>"} END{print "</table>"}' <filename> (8 Replies)
Hi,
I need to format a command output for the beolow command:
runmqckm -cert -list -db $MQ_KDB -pw $PASSWD -expiry $EXP | grep -v "Certificates in database"
The output will be:
"ABC - cert name"
From: Tuesday, May 25, 1999 11:09:40 AM CDT To: Saturday, May 25, 2019 11:39:40 AM CDT
... (3 Replies)
Hello,
In my shell script, I extract table data from HP Vertica DB into a csv file using vsql -c command. But the problem is the file getting created is in binary format and hence some of the data becomes unreadable which has chinese characters as part of data.
file -i filename.csv - gives... (2 Replies)
Hi,
OS: Redhat 7.5
shell: Bash
Wrote below script to login into oracle via shell script and trying to reset locked account..It works as expected. But I need specific output << EOF should go to target terminal not all out put
running below script from ansible command line..
#!/bin/bash... (1 Reply)
Hi All,
I am new to shell scripting, Need your help in creating a shell script which converts any unix command output to JSON format output.
example:
sample df -h command ouput :
Filesystem size used avail capacity Mounted
/dev/dsk/c1t0d0s0 8.1G 4.0G 4.0G 50% /... (13 Replies)
Discussion started by: balu1234
13 Replies
LEARN ABOUT DEBIAN
io::handle::prototype::fallback
IO::Handle::Prototype::Fallback(3pm) User Contributed Perl Documentation IO::Handle::Prototype::Fallback(3pm)NAME
IO::Handle::Prototype::Fallback - Create IO::Handle like objects using a set of callbacks.
SYNOPSIS
my $fh = IO::Handle::Prototype::Fallback->new(
getline => sub {
my $fh = shift;
...
},
);
DESCRIPTION
This class provides a way to define a filehandle based on callbacks.
Fallback implementations are provided to the extent possible based on the provided callbacks, for both writing and reading.
SPECIAL CALLBACKS
This class provides two additional methods on top of IO::Handle, designed to let you implement things with a minimal amount of baggage.
The fallback methods are all best implemented using these, though these can be implemented in terms of Perl's standard methods too.
However, to provide the most consistent semantics, it's better to do this:
IO::Handle::Prototype::Fallback->new(
__read => sub {
shift @array;
},
);
Than this:
IO::Handle::Prototype::Fallback->new(
getline => sub {
shift @array;
},
);
Because the fallback implementation of "getline" implements all of the extra crap you'd need to handle to have a fully featured
implementation.
__read
Return a chunk of data of any size (could use $/ or not, it depends on you, unlike "getline" which probably should respect the value of
$/).
This avoids the annoying "substr" stuff you need to do with "read".
__write $string
Write out a string.
This is like a simplified "print", which can disregard $, and "$" as well as multiple argument forms, and does not have the extra
"substr" annoyance of "write" or "syswrite".
WRAPPING
If you provide a single reading related callback ("__read", "getline" or "read") then your callback will be used to implement all of the
other reading primitives using a string buffer.
These implementations handle $/ in all forms ("undef", ref to number and string), all the funny calling conventions for "read", etc.
FALLBACKS
Any callback that can be defined purely in terms of other callbacks in a way will be added. For instance "getc" can be implemented in terms
of "read", "say" can be implemented in terms of "print", "print" can be implemented in terms of "write", "write" can be implemented in
terms of "print", etc.
None of these require special wrapping and will always be added if their dependencies are present.
GLOB OVERLOADING
When overloaded as a glob a tied handle will be returned. This allows you to use the handle in Perl's IO builtins. For instance:
my $line = <$fh>
will not call the "getline" method natively, but the tied interface arranges for that to happen.
perl v5.10.1 2009-09-29 IO::Handle::Prototype::Fallback(3pm)