Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Help me in just providing idea about what to be done? Post 302754027 by methyl on Thursday 10th of January 2013 12:37:57 AM
Old 01-10-2013
Report Hardware Inventory and compare with previous day, highlighting differences.
Often forgotten. This is the way to spot failed hardware one a resilient system.
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Providing a Link to Perl

I was wondering how I can create a link to the perl interpreter. On my old machine perl is at: user/local/bin/perl and my new machine has it at: user/bin/perl I don't want to have to change all my cgi scripts when I move them to the new server. Can I just create a new directory... (4 Replies)
Discussion started by: pingdom
4 Replies

2. Shell Programming and Scripting

script providing input to application prompts

Hi! I want to write a script that will create an archive (via tar) that will restrict the size of the tar file. The size can be constrained using the keyword 'k' and providing the size restriction. The problem is that the script needs to know (detect) when the tar command prompts the user (which... (2 Replies)
Discussion started by: mitch8
2 Replies

3. Shell Programming and Scripting

Limitations of awk? Good idea? Bad idea?

Keeping in mind that I'm relatively comfortable with programming in general but very new to unix and korn/bourne shell scripts.. I'm using awk on a CSV file, and then performing calculations and operations on specific fields within specific records. The CSV file I'm working with has about 600... (2 Replies)
Discussion started by: yongho
2 Replies

4. Shell Programming and Scripting

Grepping text by providing line numbers.

Dear Friends, I have a flat file from which I want to grep line no. 7,10, 19 to 35, 37. How can it be done? Thank you in advance Anushree (6 Replies)
Discussion started by: anushree.a
6 Replies

5. Shell Programming and Scripting

Help needed with bash script providing battery status

I'm really new to even doing a bash "hello world" script, so maybe someone would know how to do the following task, using bash scripting Need to login using ssh from one dell server into another dell server, and obtain the raid battery status, using dell's open manage software commands; then... (5 Replies)
Discussion started by: AJ-102111
5 Replies

6. Shell Programming and Scripting

Providing variable contents to awk

Hello, All. This is my first post here, and I expect that the answer is simple, but I can't find it. Might be the way I'm searching. I'm fairly new to Unix/Linux, and I'm writing a Korn Shell Script. I am trying to provide a value that is already in a variable to awk so that awk can pull out the... (3 Replies)
Discussion started by: compguy74
3 Replies

7. Shell Programming and Scripting

Awking string only 6 character long and providing a count

Morning Guys, I am attempting to awk a file which strings in the file is only 6 characters long and not more. Currently it is counting every line and giving a count of 59, but it should be 57 (not including the long baracode - 004705CIM*****) " awk '/./ {cnt++} END {print cnt}'... (11 Replies)
Discussion started by: Junes
11 Replies
Arch::Inventory(3pm)					User Contributed Perl Documentation				      Arch::Inventory(3pm)

NAME
Arch::Inventory - class representing a tree inventory SYNOPSIS
use Arch::Inventory qw(:category :type); my $inv = Arch::Inventory->new; # use cwd print Arch::Inventory->to_string($inv->get_root_entry), " "; print $inv->get_listing; or (most commonly): use Arch::Tree; my $tree = Arch::Tree->new; my $inv = $tree->get_inventory; print $inv->get_listing; DESCRIPTION
Arch::Inventory generates a tree inventory. An inventory is a tree structure of elements, each representing a single directory entry of the source tree. Each inventory entry is described by an hash with the following fields: category The classification of the tree element. category can be one of TREE, SOURCE, PRECIOUS, BACKUP or JUNK. untagged A boolean value indicating whether the element was first classified as SOURCE but lacked an inventory id. type The tree element type. type can be one of FILE, DIRECTORY or SYMLINK. path The complete path to the tree element relative to the inventory base directory. id The elements inventory id. May be "undef". children A hash of the elements direct children, idexed by their last path element. This field exists for elements of type DIRECTORY only. The category and type constants can be conveniently imported using the tags ":category" and ":type". use Arch::Inventory qw(:category :type); METHODS
The following methods are available: new, directory, get_root_entry, get_entry, get_listing, annotate_fs, foreach, dump, to_string. new [$dir] Create an inventory for $dir or the current directory if $dir is not specified. directory Returns the inventories base directory as passed to new. get_root_entry Returns the inventory element for the base directory. The root entry always has the following properties: $root = { category => TREE, # if {arch} exists, SOURCE otherwise untagged => 1, type => DIRECTORY, path => '', id => undef, children => { ... }, } get_entry $path get_entry @path_elements Returns the inventory element for the specified path. The path may either be given as a single string or as a list of path elements. If the element does not exist "undef" is returned. Using an empty or no path is equivalent to calling get_root_entry. get_listing Generates a textual inventory listing equivalent to the output of tla inventory -tspbju -B --kind --ids --untagged Note: The output order is not equivalent to tla. Instead of strict ASCII order of path names, a directory entry is always directly followed by its child entries. Entries with the same parent entry are ASCII ordered. annotate_fs annotate_fs $entry Add filesystem information to $entry or every inventory entry if none is provided. This adds the fields stat and symlink to the annotated entries which contain the output of lstat and readlink respectively. foreach $coderef Execute $coderef for every inventory entry, passing the entry as $_[0]. dump Generates a dump of the inventory structure using Data::Dumper. to_string $inventory_element Generates an inventory line for the inventory element as produced by tla. BUGS
Awaiting for your reports. AUTHORS
Mikhael Goikhman (migo@homemail.com--Perl-GPL/arch-perl--devel). Enno Cramer (uebergeek@web.de--2003/arch-perl--devel). SEE ALSO
For more information, see tla, Arch::Util. perl v5.10.1 2005-10-23 Arch::Inventory(3pm)
All times are GMT -4. The time now is 10:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy