![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Why generate "ash and bash" different output for same bash script? | s. murat | Shell Programming and Scripting | 0 | 05-26-2008 08:19 AM |
| Passing options to a bash script | DeCoTwc | Shell Programming and Scripting | 3 | 05-21-2008 02:43 AM |
| [BASH - KSH] Passing array to a function | ripat | Shell Programming and Scripting | 3 | 04-17-2008 09:17 AM |
| How do you parse a variable in a bash script? | vertical98 | Shell Programming and Scripting | 3 | 03-18-2008 04:30 PM |
| Conversion of bash parsing script to perl? | cstovall | Shell Programming and Scripting | 2 | 10-13-2004 11:33 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Hi All, I need to pass a variable to perl script from bash script, where in perl i am using if condition. Here is the cmd what i am using in perl Code:
FROM_DATE="06/05/2008" TO_DATE="07/05/2008" "perl -ne ' print if ( $_ >="$FROM_DATE" && $_ <= "$TO_DATE" ) ' filename" filename has following data :- Code:
06/05/2008-07:59 06/05/2008-07:59 06/05/2008-07:59 06/05/2008-07:59 06/05/2008-07:59 07/05/2008-07:59 07/05/2008-07:59 07/05/2008-07:59 07/05/2008-07:59 07/05/2008-07:59:server5:DISK 08/05/2008-07:59:server1:DISK 08/05/2008-07:59:server2:DISK 08/05/2008-07:59:server3:DISK 08/05/2008-07:59:server4:DISK 08/05/2008-07:59:server5:DISK if we hard code the values of FROM_DATE and TO_DATE it is working.I feel what to know why it is not working When i passing it as variable. it will be great if some one telle me How to pass the variable to perl properly. ![]() i am new to perl world. Thanks Arsidh Last edited by Yogesh Sawant; 05-22-2008 at 12:57 PM.. Reason: added code tags |
| Bookmarks |
| Tags |
| export, perl script |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|