11-14-2003
10 More Discussions You Might Find Interesting
1. UNIX Desktop Questions & Answers
Hey all,
I'm brand new to Unix/Linux and have a couple of questions. I own a small education/consulting company that has a staff of approx. 50 employees. Most our work is geared towards the office-style environment (i.e. Word, Excel, Powerpoint, etc.). There are also some C and Java programmers... (4 Replies)
Discussion started by: dennie1
4 Replies
2. Email Antispam Techniques and Email Filtering
Hello all. I want some help procmail receipe. I tried to get some mails' sender and receiptient. Then tried to send them a bash script. But it didnot work. I try a lot of variation of the below receipe. Could anyone can help what is wrong on my receipe? Or if the recepie is correct what can be... (0 Replies)
Discussion started by: kedi
0 Replies
3. Post Here to Contact Site Administrators and Moderators
Hi,
I am new at this site and at unix. I was reading some answers that the administrators and moderators have posted to others, and sometimes I feel like their a little sarcastic.
I am asking just to be patient to me, I know nothing about unix but I do want to learn, and I think that positive... (7 Replies)
Discussion started by: HN19
7 Replies
4. UNIX for Dummies Questions & Answers
i'm trying to figure out a script that uses sed, and i'm not totally sure if it does what I think it does.
The script...
- takes in 3 inputs, $1, $2 are names. $3 is a file.
- filename is a file.
Here is what I'm trying to figure out:
cat $3 | grep "id17" > var2
sed "s|@@.*||g" var2 >... (1 Reply)
Discussion started by: gammaman
1 Replies
5. Shell Programming and Scripting
Fairly new scripter so please bare with me if what I have done below is not according to standards.
Okay...heres what I am trying to do. I have a pattern that I need to search for in a directory. This gives me a list of files that includes a control file that contains totals of the line nos for... (3 Replies)
Discussion started by: alfredo123
3 Replies
6. Shell Programming and Scripting
Hello Folks,
I would very much appreciate if I could get help/suggestions on a particular sed usage. I have to write a script to take version info from a version file, compute the image name, print error if the image does not exist.
The version file looks like below:
"
#
# version.cfg
#... (3 Replies)
Discussion started by: fatimap
3 Replies
7. UNIX for Advanced & Expert Users
This perhaps does not belong in ths category; apologies, however, we have a heated debate going and your input will decide the result.
Should UNIX (HP, AIX, etc) be rebooted following a monthly cycle (Every month, or a qtr, etc.). We have some UX admins (grumps) who say they have seen a UX... (6 Replies)
Discussion started by: rsheikh
6 Replies
8. Shell Programming and Scripting
Hi
I have a problem to resolve, I think sed is the best option, and I am not successful yet.
Have a UNIX file which has records as of the 2 character state codes like
NY
NJ
PA
DE
From the file I need to create this as a variable in the same script or another file -... (7 Replies)
Discussion started by: snair2010
7 Replies
9. What is on Your Mind?
Dear Forum staff / Advisors / members ,
I am having something in my mind, about Linux / Unix possible Interview questions collections, I guess if I post them here,which might be useful for our members and for students, and in meantime we can discuss also about those questions, what's your... (4 Replies)
Discussion started by: Akshay Hegde
4 Replies
10. Shell Programming and Scripting
Hello ALL ,
i am requesting help on for this script i am preparing to get the result of a query in a excel sheet :
current Error:
Script : NO Excel file created.
requesting to know where i am going wrong.
#!/bin/ksh... (2 Replies)
Discussion started by: anirudhkashikar
2 Replies
LEARN ABOUT DEBIAN
arch::inventory
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)