![]() |
|
|
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 |
| Line deletion help using perl -ne | lijju.mathew | UNIX for Dummies Questions & Answers | 1 | 01-02-2008 02:54 PM |
| perl script first line | new2ss | Shell Programming and Scripting | 2 | 05-24-2007 05:17 AM |
| add to first line of file using perl | kingdbag | Shell Programming and Scripting | 5 | 11-06-2006 05:00 PM |
| perl on the command line.. | moxxx68 | Shell Programming and Scripting | 2 | 03-30-2005 02:31 PM |
| E-Mail from command line for UNIX and Perl?? | jy2728 | Shell Programming and Scripting | 4 | 11-26-2002 05:02 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
One line perl command
Does anyone know how I can add a variable to a one line perl command such as the following:
#! /bin/bash date=`date +%Y%m%d` perl -i -pe 's/(1\.1\.0\.).+/${1}${date}/' ./build_date I'd like the ${date} variable to be evaluated by the perl command. So that the perl command will read each line of the file ./build_date and replace each line that contains '1.1.0.yyyymmdd' with 1.1.0.${date}. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|