Sponsored Content
Top Forums Shell Programming and Scripting C Shell Scripting on SUA windows 7 Post 302714487 by drl on Friday 12th of October 2012 08:48:26 AM
Old 10-12-2012
Hi.
Quote:
Originally Posted by gthangav
value of $eType pased from the other file using grep.Smilie,In normal case work fine.
How is it "pased" ? -- show us the code ... cheers, drl
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

difference between AIX shell scripting and Unix shell scripting.

please give the difference between AIX shell scripting and Unix shell scripting. (2 Replies)
Discussion started by: haroonec
2 Replies

2. Windows & DOS: Issues & Discussions

windows scripting for a batch job

I have been doing unix scripting for quite awhile and there seems to be a wealth of information on it. Now I am working on migrating an intel based application to a new server. I need to modify some existing scripts, but am having trouble finding information on windows scripting, a forum similar... (2 Replies)
Discussion started by: MizzGail
2 Replies

3. Windows & DOS: Issues & Discussions

Windows Scripting

I have been involved with shell programming now for the last 5 or 6 years. I am directing my career towards IT Security and need to broaden my experience. I would like suggestions for a good programming language for Windows. Is there a Windows scripting language that is considered secure ? Has... (3 Replies)
Discussion started by: sunsysadm2003
3 Replies

4. Shell Programming and Scripting

Call Shell scripting from Perl Scripting.

Hi How to call a shell scripting through a Perl scripting? Actually I need some value from Shell scripting and passes in the Perl scripting. So how can i do this? (2 Replies)
Discussion started by: anupdas
2 Replies

5. UNIX for Dummies Questions & Answers

Need help configuring Active Perl on Windows Vista.: Perl Scripting on Windows

Hi All, Need help configuring Active Perl on Windows Vista. I am trying to install Active Perl on Windows Vista. The version of Active Perl i am trying to install is : ActivePerl 5.10.1 Build 1006 After installing it through cmd, When i try to run perl -v to check the version, i get the... (2 Replies)
Discussion started by: Vabiosis
2 Replies

6. Shell Programming and Scripting

Shell scripting on Windows platform

Is there a free unix platform that will allow me to write a shell script on my Windows OS? I have my files on my C: drive and i need to write a script that reads from those files and does some manipulation. Its pretty straightforward in unix commands hence i don't want to write a Java/C++ program... (3 Replies)
Discussion started by: jakSun8
3 Replies

7. What is on Your Mind?

Shell scripting vs Perl scripting

Hi all, I would like to start developping some good scripting skills. Do you think it would be best to start with shell scripting or Perl? I already got a fundation, really basics, in perl. but I am wondering what would be best to be good at first. Can you please help me determine which one to... (14 Replies)
Discussion started by: Pouchie1
14 Replies

8. What is on Your Mind?

Shell Scripting vs Perl scripting

Gents, I have been working in a Solaris/Unix environment for about 9 months. I took some linux classses online before getting the job. But, I am not very good at scripting. I want to learn how to script. Do you think that I should start with Shell scripting or Perl? I wanted to continue with... (2 Replies)
Discussion started by: Pouchie1
2 Replies

9. Web Development

Perl scripting or shell scripting?

i am going to study any one of the scripting languages mentioned above(shell 0r perl scripting) . Which is having more scope for a fresher? (1 Reply)
Discussion started by: Anna Hussie
1 Replies

10. Windows & DOS: Issues & Discussions

Need Help in Windows scripting

Dear Expert, Below code is for to take the backup of database by daily time stamp. I need vital help to make my script automatic sending me email if it sucess or fail. Code: echo on @REM Seamonkey’s quick date batch (MMDDYYYY format) @REM Setups %date variable @REM First parses... (0 Replies)
Discussion started by: Alone
0 Replies
Devel::Cycle(3) 					User Contributed Perl Documentation					   Devel::Cycle(3)

NAME
Devel::Cycle - Find memory cycles in objects SYNOPSIS
#!/usr/bin/perl use Devel::Cycle; my $test = {fred => [qw(a b c d e)], ethel => [qw(1 2 3 4 5)], george => {martha => 23, agnes => 19} }; $test->{george}{phyllis} = $test; $test->{fred}[3] = $test->{george}; $test->{george}{mary} = $test->{fred}; find_cycle($test); exit 0; # output: Cycle(1): $A->{'george'} => \%B $B->{'phyllis'} => \%A Cycle(2): $A->{'george'} => \%B $B->{'mary'} => @A $A->[3] => \%B Cycle(3): $A->{'fred'} => @A $A->[3] => \%B $B->{'phyllis'} => \%A Cycle(4): $A->{'fred'} => @A $A->[3] => \%B $B->{'mary'} => @A # you can also check weakened references weaken($test->{george}->{phyllis}); find_weakened_cycle($test); exit 0; # output: Cycle(1): $A->{'george'} => \%B $B->{'mary'} => @C $C->[3] => \%B Cycle(2): $A->{'george'} => \%B w-> $B->{'phyllis'} => \%A Cycle(3): $A->{'fred'} => @C $C->[3] => \%B $B->{'mary'} => @C Cycle(4): $A->{'fred'} => @C $C->[3] => \%B w-> $B->{'phyllis'} => \%A DESCRIPTION
This is a simple developer's tool for finding circular references in objects and other types of references. Because of Perl's reference- count based memory management, circular references will cause memory leaks. EXPORT The find_cycle() and find_weakened_cycle() subroutine are exported by default. find_cycle($object_reference,[$callback]) The find_cycle() function will traverse the object reference and print a report to STDOUT identifying any memory cycles it finds. If an optional callback code reference is provided, then this callback will be invoked on each cycle that is found. The callback will be passed an array reference pointing to a list of lists with the following format: $arg = [ ['REFTYPE',$index,$reference,$reference_value], ['REFTYPE',$index,$reference,$reference_value], ['REFTYPE',$index,$reference,$reference_value], ... ] Each element in the array reference describes one edge in the memory cycle. 'REFTYPE' describes the type of the reference and is one of 'SCALAR','ARRAY' or 'HASH'. $index is the index affected by the reference, and is undef for a scalar, an integer for an array reference, or a hash key for a hash. $reference is the memory reference, and $reference_value is its dereferenced value. For example, if the edge is an ARRAY, then the following relationship holds: $reference->[$index] eq $reference_value The first element of the array reference is the $object_reference that you pased to find_cycle() and may not be directly involved in the cycle. If a reference is a weak ref produced using Scalar::Util's weaken() function then it won't contribute to cycles. find_weakened_cycle($object_reference,[$callback]) The find_weakened_cycle() function will traverse the object reference and print a report to STDOUT identifying any memory cycles it finds, including any weakened cycles produced using Scalar::Util's weaken(). If an optional callback code reference is provided, then this callback will be invoked on each cycle that is found. The callback will be passed an array reference pointing to a list of lists with the following format: $arg = [ ['REFTYPE',$index,$reference,$reference_value,$is_weakened], ['REFTYPE',$index,$reference,$reference_value,$is_weakened], ['REFTYPE',$index,$reference,$reference_value,$is_weakened], ... ] Each element in the array reference describes one edge in the memory cycle. 'REFTYPE' describes the type of the reference and is one of 'SCALAR','ARRAY' or 'HASH'. $index is the index affected by the reference, and is undef for a scalar, an integer for an array reference, or a hash key for a hash. $reference is the memory reference, and $reference_value is its dereferenced value. $is_weakened is a boolean specifying if the reference is weakened or not. For example, if the edge is an ARRAY, then the following relationship holds: $reference->[$index] eq $reference_value The first element of the array reference is the $object_reference that you pased to find_cycle() and may not be directly involved in the cycle. Cycle Report Formats The default callback prints out a trace of each cycle it finds. You can control the format of the trace by setting the package variable $Devel::Cycle::FORMATTING to one of "raw," "cooked," or "roasted". The "raw" format prints out anonymous memory references using standard Perl memory location nomenclature. For example, a "Foo::Bar" object that points to an ordinary hash will appear in the trace like this: Foo::Bar=HASH(0x8124394)->{'phyllis'} => HASH(0x81b4a90) The "cooked" format (the default), uses short names for anonymous memory locations, beginning with "A" and moving upward with the magic ++ operator. This leads to a much more readable display: $Foo::Bar=B->{'phyllis'} => \%A The "roasted" format is similar to the "cooked" format, except that object references are formatted slightly differently: $Foo::Bar::B->{'phyllis'} => \%A If a reference is a weakened ref, then it will have a 'w->' prepended to it, like this: w-> $Foo::Bar::B->{'phyllis'} => \%A For your convenience, $Devel::Cycle::FORMATTING can be imported: use Devel::Cycle qw(:DEFAULT $FORMATTING); $FORMATTING = 'raw'; Alternatively, you can control the formatting at compile time by passing one of the options -raw, -cooked, or -roasted to "use" as illustrated here: use Devel::Cycle -raw; Code references (closures) If the PadWalker module is installed, Devel::Cycle will also report cycles in code closures. If PadWalker is not installed and Devel::Cycle detects a CODE reference in one of the data structures, it will warn (once per data structure) that it cannot inspect the CODE unless PadWalker is available. You can turn this warning off by passing -quiet to Devel::Cycle at compile time: use Devel::Cycle -quiet; SEE ALSO
Test::Memory::Cycle Devel::Leak Scalar::Util AUTHOR
Lincoln Stein, <lstein@cshl.edu> COPYRIGHT AND LICENSE
Copyright (C) 2003 by Lincoln Stein This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.2 or, at your option, any later version of Perl 5 you may have available. perl v5.16.3 2014-06-10 Devel::Cycle(3)
All times are GMT -4. The time now is 03:44 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy