Sponsored Content
Top Forums Shell Programming and Scripting PERL - printing a hash of hashes to screen Post 302348900 by pludi on Sunday 30th of August 2009 10:53:25 AM
Old 08-30-2009
By the way, Data::Dumper isn't a new module, but has been a part of the core distribution for quite some time now. It has the advantage that you can write a quick store/restore part using it and eval.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Perl hashes "Can't use subscript on private hash"

This is driving me mad, where am I going wrong? The relevant segment of code: sub getndsybcons { my @servers=@{$_}; my @sybservers=@{$_}; my %results; foreach my $server(@servers) { my $biggestsyb; my $biggestsybval=0; ... (9 Replies)
Discussion started by: Smiling Dragon
9 Replies

2. Shell Programming and Scripting

Print Entire hash list (hash of hashes)

I have a script with dynamic hash of hashes , and I want to print the entire hash (with all other hashes). Itried to do it recursively by checking if the current key is a hash and if yes call the current function again with refference to the sub hash. Most of the printing seems to be OK but in... (1 Reply)
Discussion started by: Alalush
1 Replies

3. Shell Programming and Scripting

perl hash of hashes from database

hi there, I have some database output that looks like this SELECT nic_name,nic_duplex,nic_speed,nic_ip FROM network_table WHERE hostname = "server1" result is this (ive delimited with a pipe for ease of reading) bge0|full|1000|10.32.100.1 bge1|full|1000|11.12.101.7 ... (1 Reply)
Discussion started by: hcclnoodles
1 Replies

4. Shell Programming and Scripting

PERL - another quick hash of hashes question

Hi, sorry, two hash related questions in one day .. but this has got me a bit stuck. I have a mysql database table that kind of looks like this, the table is called "view1" and a snippet of that table (SELECT'ing just rows with serial number 0629AN1200) is below serial nic_name ... (2 Replies)
Discussion started by: hcclnoodles
2 Replies

5. Shell Programming and Scripting

hash of hashes : how to print reference and its internal structure?

#use perl 5.8.5; my %h1=(a=>'b', c=>'d'); my %h2=(a1=>'b1', c1=>'d1'); my $R1=\%h1; my $R2=\%h2; my %h= {$R1, $R2}; my $href=\%h; # hash of hashes foreach my $key (keys %$href){ print "Z::$$href{$key}\n" } When I am trying to print elements of hash of hashes, it prints HASH... (1 Reply)
Discussion started by: shristi
1 Replies

6. Shell Programming and Scripting

perl: dereferencing a hash of hashes

Hi there, I am trying to dereference my hash of hashes but post dereferencing, it seems to lose its structure I am using Data::dumper to help me anaylise. This is the code im using to build the HoH, (data comes from a file). I have also performed a Dumper on the data structure before and after... (1 Reply)
Discussion started by: rethink
1 Replies

7. Shell Programming and Scripting

Compare values of hashes of hash for n number of hash in perl without sorting.

Hi, I have an hashes of hash, where hash is dynamic, it can be n number of hash. i need to compare data_count values of all . my %result ( $abc => { 'data_count' => '10', 'ID' => 'ABC122', } $def => { 'data_count' => '20', 'ID' => 'defASe', ... (1 Reply)
Discussion started by: asak
1 Replies

8. Homework & Coursework Questions

[solved]Perl: Printing line numbers to matched strings and hashes.

Florida State University, Tallahassee, FL, USA, Dr. Whalley, COP4342 Unix Tools. This program takes much of my previous assignment but adds the functionality of printing the concatenated line numbers found within the input. Sample input from <> operator: Hello World This is hello a sample... (2 Replies)
Discussion started by: D2K
2 Replies

9. Shell Programming and Scripting

Perl: Printing null hash values as a " "?

I'm filling in a table of values for grades. I decided to go with reading into a hash from the files but I'm coming up with an error when printing a value that does not exist. I need to know if I can on-the-fly print a space (" ") or blank in place of the grade. Here's what the output should... (2 Replies)
Discussion started by: D2K
2 Replies

10. Shell Programming and Scripting

Perl hash of hashes anonymous array

Hello experts. I'm having problems with a snippet of code. I was hoping to get help/advice to correct. A file that this script parses has changed to the point where I can no longer use a scalar, it looks as though I need to create an array for a hash of hashes below. The first output of... (1 Reply)
Discussion started by: timj123
1 Replies
EFICHECK(8)						    BSD System Manager's Manual 					       EFICHECK(8)

NAME
eficheck -- check the integrity of the x86 flash chip firmware. SYNOPSIS
eficheck --integrity-check [-h EFI-hash-input-file] [-b EFI-binary-input-file] eficheck --show-hashes [-h EFI-hash-input-file] [-b EFI-binary-input-file] eficheck --generate-hashes [-h EFI-hash-output-file] [-p output-path] eficheck --save [-b EFI-binary-output-file] eficheck --cleanup [-b EFI-binary-input-and-output-file>] eficheck --version eficheck --help DESCRIPTION
eficheck is a tool to check the x86 flash chip firmware. The following commands can be used with eficheck: --integrity-check hashes portion of the firmware and compares against known-good hashes --generate-hashes outputs hashes for a given firmware to be used as known-good hashes --show-hashes shows the hashes for the sub-sections of the firmware which are measured --save saves the full flash chip contents to a binary file. Requires root privileges. --cleanup zeros any privacy-sensitive data (such as nvram), enabling the file to be shared for analysis. --version print out eficheck version number. --help display a short help. EXAMPLES
'eficheck --save -b firmware.bin' Save this system's EFI firmware as firmware.bin 'eficheck --cleanup -b firmware.bin' Overwrite the EFI variables portion of the firmware.bin, in place 'eficheck --generate-hashes' Analyze the current system's installed EFI firmware, and store the hashes into hash file(s) in current folder File name(s) will be selected according to image's EFI version(s) 'eficheck --generate-hashes -b firmware.bin' Analyze the firmware.bin, and store the hashes into hash file(s) in current folder. Filename will be based on the detected firmware version. 'eficheck --generate-hashes -p /usr/local/allowlists' Analyze the current system's installed EFI firmware, and store the hashes into hash file(s) in /usr/local/allowlists folder 'eficheck --integrity-check' Attempt to automatically determine which firmware you are running, and integrity check against the appropriate file, and report any differences 'eficheck --integrity-check -h /usr/libexec/firmwarecheckers/eficheck/EFIAllowListShipping.bun- dle/allowlists/IM171.88Z.0105.B08.1604111319.0.ealf' Compare the current system's EFI firmware against the Apple-provided expected measurements for an "iMac17,1" at firmware revision B08, and report any differences 'eficheck --integrity-check -h hash.ealf -b firmware.bin' Compare the given hash file against against the given firmware image and report any differences 'eficheck --show-hashes' Print the hashes for the current system's installed EFI firmware to stdout 'eficheck --show-hashes -b firmware.bin' Print the hashes for the given firmware.bin to stdout 'eficheck --show-hashes -h IM171.88Z.0105.B08.1604111319.0.ealf' Print the hashes for the given allowlist to stdout May 25, 2017
All times are GMT -4. The time now is 02:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy