Sponsored Content
Full Discussion: Please help!!!
Top Forums Shell Programming and Scripting Please help!!! Post 302080840 by mhssatya on Thursday 20th of July 2006 06:10:56 PM
Old 07-20-2006
Reborg,

If I give like CARE01_DLY_???_YYYYMMDD how can the system calculate that it's todays file only. I need to make sure that that is today file.

Do i need to give this like this

awk '{data[FNR] = $0; out=CARE01_DLY_???_date+%Y%m%d"_new"; file[FNR]=out;} END { if ( FNR - 2 == $1) { for ( i=2 ; i < FNR; i++ ) { print data > file[i]} close(file[i])}else { print "error"} }' CARE01_DLY_???_date+%Y%m%d

This is not working for me. Please suggest
 
LexAlias(3pm)						User Contributed Perl Documentation					     LexAlias(3pm)

NAME
Devel::LexAlias - alias lexical variables SYNOPSIS
use Devel::LexAlias qw(lexalias); sub steal_my_x { my $foo = 1; lexalias(1, '$x', $foo); } sub foo { my $x = 22; print $x; # prints 22 steal_my_x; print $x; # prints 1 } DESCRIPTION
Devel::LexAlias provides the ability to alias a lexical variable in a subroutines scope to one of your choosing. If you don't know why you'd want to do this, I'd suggest that you skip this module. If you think you have a use for it, I'd insist on it. Still here? lexalias( $where, $name, $variable ) $where refers to the subroutine in which to alias the lexical, it can be a coderef or a call level such that you'd give to "caller" $name is the name of the lexical within that subroutine $variable is a reference to the variable to install at that location BUGS
lexalias delves into the internals of the interpreter to perform its actions and is so very sensitive to bad data, which will likely result in flaming death, or a core dump. Consider this a warning. There is no checking that you are attaching a suitable variable back into the pad as implied by the name of the variable, so it is possible to do the following: lexalias( $sub, '$foo', [qw(an array)] ); The behaviour of this is untested, I imagine badness is very close on the horizon though. SEE ALSO
peek_sub from PadWalker, Devel::Peek AUTHOR
Richard Clamp <richardc@unixbeard.net> with close reference to PadWalker by Robin Houston COPYRIGHT
Copyright (c) 2002, Richard Clamp. All Rights Reserved. This module is free software. It may be used, redistributed and/or modified under the same terms as Perl itself. perl v5.14.2 2002-07-25 LexAlias(3pm)
All times are GMT -4. The time now is 11:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy