Sponsored Content
Full Discussion: System variables in Perl
Top Forums Shell Programming and Scripting System variables in Perl Post 302344889 by jhbamboo on Tuesday 18th of August 2009 01:02:59 AM
Old 08-18-2009
it works! Thanks a bunch!!
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Write system variables into file

Hi everyone, I was told, i my job, to do a script that creates the backup of all the files that are important to us. So i created the script, put it in the crontab and it works great. Now what i want is to write to a file what directories have being copied with date and time. How can i... (3 Replies)
Discussion started by: jorge.ferreira
3 Replies

2. UNIX for Advanced & Expert Users

system variables

Hi, I recently encountered the notion of a 'system variable' in unix which is displayable only via echo $(<var>) rather than echo $<var> They are NOT environment variables since they can't be set by the user - they live in a different name space, but are 'in place' when the user... (2 Replies)
Discussion started by: Ken Quirici
2 Replies

3. UNIX for Dummies Questions & Answers

set variables on remote system

Hi, I try to run a script on remote systems with ssh it should execute a command, read values from stdout, use it as input for a loop and works with this variable on remote system but the variable isn't working, I guess because export, echo , or the loop itself are shell builtins and not... (2 Replies)
Discussion started by: funksen
2 Replies

4. Shell Programming and Scripting

Perl variables in exec or system

I am new in Perl. I am working in simple script and the varibles are working well outside the exec or system command. but they don't work as parameters to exec or system command. The script is attached. please help. (8 Replies)
Discussion started by: ahmed_zaher
8 Replies

5. UNIX for Dummies Questions & Answers

System Variables

Is there something called system variables in Unix? Can someone list a few of them? Does it include variables like HOME, TERM, PWD etc.? (1 Reply)
Discussion started by: prasanna1157
1 Replies

6. Shell Programming and Scripting

Variables in perl

I don't fully understand variables in perl. If we have a variable defined like this "my $number = 1" then this is called a lexical variable? But if you define this at the top of a script then why isn't it a global variable because it would be available throughout the file? Sorry if this is... (1 Reply)
Discussion started by: P3rl
1 Replies

7. UNIX for Dummies Questions & Answers

I am not able to use variables in system command in a C program

this method is not working.I am having a problem to use variables in system command. i cannot use the variables in system command. this how i was did system("whereis command"); this method works very fine. but, i want use the commands as variable. that means i want only pass the variables.... (6 Replies)
Discussion started by: dhanda2601
6 Replies

8. Shell Programming and Scripting

Doing math using user defined input and system environment variables

Hi, I need some help to setup some environmental variables. for example...Get A -> userdefined/user input B -> a number. c -> system variable...for example $GETCONF PAGE_SIZE E = do some math using bc display a message "The value is E" setup the system/kernel paramter sysctl -p... (3 Replies)
Discussion started by: saravanapandi
3 Replies

9. UNIX for Dummies Questions & Answers

Variables in perl script

Hi Chaps, Im after some advise with a script i've written however doesnt appear to work how I would like. Basically I have a perl script which sucessfully pulls an expect script to login to multiple nodes and obtain some output from the nodes (total number of nat ports that are in use... (0 Replies)
Discussion started by: mutley2202
0 Replies

10. Programming

PERL: In a perl-scripttTrying to execute another perl-script that SETS SOME VARIABLES !

I have reviewed many examples on-line about running another process (either PERL or shell command or a program), but do not find any usefull for my needs way. (Reviewed and not useful the system(), 'back ticks', exec() and open()) I would like to run another PERL-script from first one, not... (1 Reply)
Discussion started by: alex_5161
1 Replies
Arch::RevisionBunches(3pm)				User Contributed Perl Documentation				Arch::RevisionBunches(3pm)

NAME
Arch::RevisionBunches - manage bunches of related revisions SYNOPSIS
use Arch::RevisionBunches; use Arch::Tree; my $rb = Arch::RevisionBunches->new; my $tree = Arch::Tree->new(".", own_logs => 1); $rb->add_revision_descs($tree->get_history_revision_descs); $rb->rebunch(25); # the default is 50 foreach my $bunch ($rb->get) { print "$bunch->{version} "; print " $_->{name} $_->{summary} " foreach @{$bunch->{revision_descs}}; } foreach my $bunch ($rb->reverse_revision_descs->rebunch(30)) { print $bunch->{name1}; print " .. $bunch->{name2}" if $bunch->{name2}; print " ($bunch->{daysago1}"; print " .. $bunch->{daysago2}" if $bunch->{name2}; print " days ago) "; } DESCRIPTION
This class helps front-ends to group revisions. Such grouping is essential when, for example, the version to be shown contains thousands of revisions. The front-end may decide to show expandable bunches of 100 revisions each. There is a support for revision descriptions (summary, date, creator, email, and in some cases associated the file name and/or the associated version). There is a constraint by convention, one bunch may only contain revisions of the same version, and the ones associated with the same file if applicable. It is possible to define an order of versions. It is possible to recreate bunches (rebunch) using a different number of revisions. The constraint defines the actual number of revisions in different bunches, it is not guaranteed to be the same. METHODS
The following methods are available: new, init, add_revision_descs, versions, rebunch, get, clear, reverse_revision_descs, versions, filepaths. new [%args] Construct Arch::RevisionBunches object. The %args are passed to init method. init [%args] The %args keys may be bunch_size (to use as the default bunch size instead of 50), max_sumlen (maximal summary length to keep including trailing ellipsis, must be greater than 5), version (if set, then all revisions are assumed to be of one version, otherwise multiple versions are assumed), final_revision and final_filepath (the final revision and filepath for which the revision bunches are constructed). These last two %args keys are not really used yet. add_revision_descs [%constant_fields] Add revision descriptions that is arrayref of hashes. See other classes that return such revision descriptions. If the %constant_fields is given, then add these to all revision descriptions (rarely needed). Return the object, this enables chaining of get or rebunch method call. rebunch [bunch_size] Group newly added revisions if no bunch_size is specified. Otherwise regroup all revisions using a given bunch_size. The default bunch size may be specified in the constructor. Return the same get does. get Return bunches that is arrayref in scalar context, array in list context. Each bunch is hashref with keys: revision_descs name1 daysago1 time1 tz1 name2 daysago2 time2 tz2 size num_creators num_other_creators main_creator main_email creator name date summary and optionally "version", "is_missing" and "filepath" if applicable. This method implicitly calls rebunch with no parameter if new revision descriptions were added that are not bunched yet. clear Clear all bunches and their revision descriptions. reverse_revision_descs Effectivelly empty all revision descriptions (both old and new) and readd them in the reverse order. Return the object, this enables chaining of get or rebunch method call. versions Return distinct versions participated in all bunches. Return empty arrayref if not applicable, i.e. if version is given in the constructor. filepaths Return distinct filepaths participated in all bunches. Return empty arrayref if not applicable, i.e. if revision descriptions have no filepath. BUGS
Waiting for your reports. AUTHORS
Mikhael Goikhman (migo@homemail.com--Perl-GPL/arch-perl--devel). SEE ALSO
For more information, see Arch::Tree, Arch::Log, Arch::Session, Arch::Library. perl v5.10.1 2005-02-21 Arch::RevisionBunches(3pm)
All times are GMT -4. The time now is 12:12 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy