Sponsored Content
Top Forums Shell Programming and Scripting [TIP] Processing YAML files with yq Post 303040438 by stomp on Tuesday 29th of October 2019 11:17:35 AM
Old 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

Processing files within a directory one by one

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

Two files processing

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

Processing files

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

problems iterating in RUBY while extracting info from YAML, Pls help!

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

get all files from a directory and pass the files for processing

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

Processing files using awk

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

Cygwin Errors: Yaml Configuration issues

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

Processing of log files

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

YAML file update

removing post since it got fix (1 Reply)
Discussion started by: kishore150
1 Replies

10. UNIX for Beginners Questions & Answers

[Tip] Housekeeping Tasks Made Easy - User Home directories and Leftover Files

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
Test::CPAN::Meta::YAML(3pm)				User Contributed Perl Documentation			       Test::CPAN::Meta::YAML(3pm)

NAME
Test::CPAN::Meta::YAML - Validate a META.yml file within a CPAN distribution. SYNOPSIS
There are two forms this module can be used. The first is a standalone test of your distribution's META.yml file: use Test::More; eval "use Test::CPAN::Meta::YAML"; plan skip_all => "Test::CPAN::Meta::YAML required for testing META.yml" if $@; meta_yaml_ok(); Note that you may provide an optional label/comment/message/etc to the function, or one will be created automatically. The second form allows you to test other META.yml files, or specify a specific version you wish to test against: use Test::More test => 6; use Test::CPAN::Meta::YAML; # specify a file and specification version meta_spec_ok('META.yml','1.3',$msg); # specify the specification version to validate the local META.yml meta_spec_ok(undef,'1.3',$msg); # specify a file, where the specification version is deduced # from the file itself meta_spec_ok('META.yml',undef,$msg); Note that this form requires you to specify the number of tests you will be running in your test script. Also note that each 'meta_spec_ok' is actually 2 tests under the hood. DESCRIPTION
This module was written to ensure that a META.yml file, provided with a standard distribution uploaded to CPAN, meets the specifications that slowly being introduced to module uploads, via the use of ExtUtils::MakeMaker, Module::Build and Module::Install. See CPAN::Meta for further details of the CPAN Meta Specification. ABSTRACT
A test module to validate a META.yml file. FUNCTIONS
o meta_yaml_ok([$msg]) Basic META.yml wrapper around meta_spec_ok. o meta_spec_ok($file, $version [,$msg]) Validates the named file against the given specification version. Both $file and $version can be undefined. TESTING META FILES
There are currently 3 distributions to test META files: Test-CPAN-Meta Test-CPAN-Meta-JSON Test-CPAN-Meta-YAML All three have slightly different requirements and are intended to be used in slightly different environments. Test-CPAN-Meta-YAML requires a YAML parser, and currently looks for the YAML or YAML::Syck modules. This is the original variant of the 3 and was intended to provide a more complete YAML validation of a META.yml. Test-CPAN-Meta requires the Parse::CPAN::Meta module, which is now part of Perl Core as of perl-5.10.1. This version is intended to be used by those only wishing to rely on core modules to test their META.yml files. Test-CPAN-Meta-JSON is the most recent addition to the family, and is specifically aimed at those distributions that use a META.json Meta file. The distribution requires the JSON module to parse the Meta file. BUGS, PATCHES &; FIXES There are no known bugs at the time of this release. However, if you spot a bug or are experiencing difficulties that are not explained within the POD documentation, please send an email to barbie@cpan.org or submit a bug to the RT system (http://rt.cpan.org/Public/Dist/Display.html?Name=Test-CPAN-Meta-YAML). However, it would help greatly if you are able to pinpoint problems or even supply a patch. Fixes are dependent upon their severity and my availability. Should a fix not be forthcoming, please feel free to (politely) remind me. SEE ALSO
Test::YAML::Valid AUTHOR
Barbie, <barbie@cpan.org> for Miss Barbell Productions, <http://www.missbarbell.co.uk> COPYRIGHT AND LICENSE
Copyright (C) 2007-2012 Barbie for Miss Barbell Productions This module is free software; you can redistribute it and/or modify it under the Artistic Licence v2. perl v5.14.2 2012-04-19 Test::CPAN::Meta::YAML(3pm)
All times are GMT -4. The time now is 04:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy