Thanks for the update.
I ran this to update (as I had done earlier to do the initial install):
but this is what I got:
On a system:
Let me know if you see something wrong here. Do you want me to post this as an issue on github?
However, I got:
On a system:
And the command jc -p ls -l /usr/bin appeared to work correctly on that system.
Best wishes, cheers, drl
Last edited by drl; 02-23-2020 at 08:23 AM..
Reason: Add information.
Hi All,
I have a output like below values
val1=test.com
val2=10.26.208.11
val3=en1
val4=test-priv1.com
val5=192.168.3.4
val6=en2
val7=test-priv2.com
val8=192.168.4.4
val9=en3
val10=test-vip.com
val11=10.26.208.9
val12=$val3
I want to convet this output values into below... (1 Reply)
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)
Hello Experts,
Below is the record i have:
sample data attached
I want this record of each row to be in single line and there are multiple rowise unixtime mentioned e.g 11996327 , This needs to be converted to Human readdable data and time from multiple rows
Can you help me , it will be... (10 Replies)
Hello everyone,
I have created a workflow that will pull down data via a RESTful API in JSON, then my code parses and modifies said data. The problem I have is that these APIs I am working with only accept XML to PUT/POST data, and I am looking for an easy way to convert my JSON file to XML.
... (2 Replies)
Hello Everyone,
I have a sample file raw.txt as shown below :
Drive Bays
Bay Name : SD-2C
Number of Standby Power Supplies : 4
Number of Drive Enclosures : 12
Summary Status of Contained Modules
All... (6 Replies)
Dear friends,
I'm getting below API result and i would like to format them with Shell scripting.
Input
"id": 9,
"description": "short desc",
"name": "test",
"name_with_namespace": "ABCD-PDFF-PLATFORM-TEST-V1 / test",
"path": "test",
"path_with_namespace":... (7 Replies)
Hi All,
i am trying to print the solaris 11 packages in below required format, But i am unable to do that.
Current ouput :
root@abc# pkginfo -l | egrep '(BASEDIR|NAME|VERSION)' | awk '{print}'
NAME: QLogic 570x/571x Gigabit Ethernet Driver
VERSION: 11.11,REV=2009.11.11
... (7 Replies)
This is the sample json I have pasted here. I want all the IP address strings to be converted into an array. For example "10.38.32.202" has to be converted to everywhere in the JSON. There are multiple IPs in a JSON I am pasting one sample object from the JSON. But the IPs already in an Array... (11 Replies)
Hi All,
i am trying to print the df -h ouput in json format. using below script.
#!/usr/bin/env bash
df -h > /tmp/sdf
nawk '{print " "$1" "$2" "$3" "$4" "$5" "$6" "}' /tmp/sdf > /tmp/sdf1
nawk 'NR==1 { for (i=1; i<=NF; i++) { f = i }}{ print $(f), $(f), $(f), $(f), ... (2 Replies)
Discussion started by: sravani25
2 Replies
LEARN ABOUT DEBIAN
template::plugin::json::escape
Template::Plugin::JSON::Escape(3pm) User Contributed Perl Documentation Template::Plugin::JSON::Escape(3pm)NAME
Template::Plugin::JSON::Escape - Adds a .json vmethod and a json filter.
SYNOPSIS
[% USE JSON.Escape( pretty => 1 ) %];
<script type="text/javascript">
var foo = [% foo.json %];
var bar = [% json_string | json %]
</script>
or read in JSON
[% USE JSON.Escape %]
[% data = JSON.Escape.json_decode(json) %]
[% data.thing %]
DESCRIPTION
This plugin allows you to embed JSON strings in HTML. In the output, special characters such as "<" and "&" are escaped as "uxxxx" to
prevent XSS attacks.
It also provides decoding function to keep compatibility with Template::Plugin::JSON.
FEATURES
USE JSON.Escape
Any options on the USE line are passed through to the JSON object, much like "to_json" in JSON.
json vmethod
A ".json" vmethod converts scalars, arrays and hashes into corresponding JSON strings.
[% json_stuct = { foo => 42, bar => [ 1, 2, 3 ] } %]
<script>
var json = [% json_struct.json %];
</script>
<span onclick="doSomething([% json_struct.json %]);">
json filter
A "json" filter escapes "<", ">", "&", "+", "U+2028" and "U+2029" as "uxxxx". In the attribute, you may just use an "html" filter.
[% json_string = '{ "foo": 42, "bar": [ 1, 2, 3 ] }' %]
<script>
var json = [% json_string | json %];
</script>
<span onclick="doSomething([% json_string | html %]);">
json_decode method
A "json_decode" method allow you to convert from a JSON string into a corresponding data structure.
[% SET json_struct = JSON.Escape.json_decode(json_string) %]
[% json_struct.foo | html %]
SEE ALSO
Template::Plugin::JSON, JSON, Template::Plugin
VERSION CONTROL
https://github.com/nanto/perl-Template-Plugin-JSON-Escape <https://github.com/nanto/perl-Template-Plugin-JSON-Escape>
AUTHOR
nanto_vi (TOYAMA Nao) <nanto@moon.email.ne.jp>
COPYRIGHT & LICENSE
Copyright (c) 2011 nanto_vi (TOYAMA Nao).
Copyright (c) 2006, 2008 Infinity Interactive, Yuval Kogman.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
perl v5.14.2 2011-06-13 Template::Plugin::JSON::Escape(3pm)