10-29-2019
I just read that yq is not a standalone script, but does only a data transition from YAML to JSON and then feeds the data into jq with the user-given jq-expression and thus relies on jq to be installed. It comes with another tool named xq which works the same way with XML.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi
How to create a shell script which takes in to account all the files present within a directory DIR one by one
e.g.
suppose i have a directory named DIR where there are files with the extension .ABC
i want to create shell script which processes all these files one by one.
... (1 Reply)
Discussion started by: skyineyes
1 Replies
2. Shell Programming and Scripting
I have the following two files:
1st File:
1:1:100
2:101:400
3:401:450
4:451:600
5:601:980
6:981:1500
7:1501:1600
8:1601:1800
9:1801:2000
2nd File:
30
50
80
700 (2 Replies)
Discussion started by: moutaz1983
2 Replies
3. Shell Programming and Scripting
Hi
I have the folowing input file, the file looks like below
sftp>
.
..
archive
x001_ameint*.zip
x001_ameint_1.zip
x001_ameint_2.zip
x001_REPORTS*.zip
x001_REPORTS_1.zip
sftp>
I want my output to look like this
x001_ameint*.zip
x001_ameint_1.zip
x001_ameint_2.zip (1 Reply)
Discussion started by: ramky79
1 Replies
4. Programming
Hi all,
I am stuck with a ruby script that extracts detials from yaml file and processes accordingly.
the yaml file
confivnic:
device:
vnic1:
policy:
- L2
mode: active
vnic2:
policy:
- L3
- L4
mode: active
type: aggr
... (1 Reply)
Discussion started by: wrapster
1 Replies
5. Shell Programming and Scripting
Hi All,
I have a directory in which there will be several files. i want to get all the files and pass it to a piece of code for processing on the files.
This is the piece of code which does the processing.
tr "\n" "|" < (log file name) | tr "$" "\n" > output
echo ' ' >>output
while... (1 Reply)
Discussion started by: suresh_kb211
1 Replies
6. Shell Programming and Scripting
Hi
I have files in our UNIX directory like the below
-rw-r--r-- 1 devinfo devsupp 872 Sep 14 02:09 IMGBTREE27309_12272_11_1_0_FK.idx0
-rw-r--r-- 1 devinfo devsupp 872 Sep 14 02:09 IMGBTREE27309_12272_11_0_0_PK.idx0
-rw-r--r-- 1 devinfo devsupp 432 Sep 14... (7 Replies)
Discussion started by: rbmuruga
7 Replies
7. UNIX for Dummies Questions & Answers
Hi everyone!
Hope all of you will be fine. I am new to this forum.
Well, I am trying to configure yaml-0.1.4 in cygwin on Windows 7.
I have written the following command:
*******/tmp/yaml-0.1.4
$ ./configure --prefix=/usr && make && make install
and the following error appeared.
... (3 Replies)
Discussion started by: imdalucky1
3 Replies
8. Shell Programming and Scripting
Hi,
I have typical logs file something of these formats -
fn2013.12.13.log
fn2013.12.13_a.log
fn2013.12.13_b.log
suffix part is after the underscore ( ie a.log or b.log )
I need to process the files in ascending date order, but descending suffix order, and check if the file exist and... (12 Replies)
Discussion started by: scott_apc
12 Replies
9. Shell Programming and Scripting
removing post since it got fix (1 Reply)
Discussion started by: kishore150
1 Replies
10. UNIX for Beginners Questions & Answers
We have regularly questions about how to create users and user accounts. But regularly user accounts need to be deleted too. It is quite easy to delete the user account itself but usually the HOME directory of the user remains.
It is good style to remove these directories but simply deleting... (3 Replies)
Discussion started by: bakunin
3 Replies
LEARN ABOUT DEBIAN
tm::serializable::jtm
TM::Serializable::JTM(3pm) User Contributed Perl Documentation TM::Serializable::JTM(3pm)
NAME
TM::Serializable::JTM - Topic Maps, trait for reading/writing JSON Topic Map instances.
SYNOPSIS
# NOTE: this is not an end-user package,
# see TM::Materialized::JTM for common application patterns
# reading JSON/YAML:
my $tm=TM->new(...);
Class::Trait->apply($tm,"TM::Serializable::JTM");
$tm->deserialize($jsondata);
# writing JSON/YAML:
# ...a map $tm is instantiated somehow
Class::Trait->apply($tm,"TM::Serializable::JTM");
my $yamltext=$tm->serialize(format=>"yaml");
DESCRIPTION
This trait provides functionality for reading and writing Topic Maps in JTM (JSON Topic Map) format, as defined here:
<http://www.cerny-online.com/jtm/1.0/>.
Limitations:
o Variants are not supported by TM.
o Reification of basenames, occurrences and roles is not supported by TM.
o Multiple scopes are not supported by TM.
INTERFACE
Methods
deserialize
This method take a string and parses JTM content from it. It will raise an exception on any parsing error. On success, it will return
the map object.
The method understands one key/value parameter pair:
o format (choices: "json", "yaml")
This option controls whether the JTM is expected to be in JSON format or in YAML (which is a superset of JSON).
If no format parameter is given but the TM::Materialized::JTM trait is used, then the format is inherited from there; otherwise the
default is "json".
serialize
This method serializes the map object in JTM notation and returns the result as a string.
The method understands one key/value parameter pair:
o format (choices: "json", "yaml")
This option controls whether the JTM result should be created in the JSON format or in YAML (which is a superset of JSON).
If no format parameter is given but the TM::Materialized::JTM trait is used, then the format is inherited from there; otherwise the
default is "json".
SEE ALSO
TM, TM::Serializable
AUTHOR INFORMATION
Copyright 2010, Alexander Zangerl, All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
http://www.perl.com/perl/misc/Artistic.html
perl v5.10.1 2010-07-18 TM::Serializable::JTM(3pm)