![]() |
|
|
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 |
| Converting Binary decimal coded values to Ascii Values | gaur.deepti | UNIX for Advanced & Expert Users | 3 | 04-02-2008 01:33 PM |
| param with awk | itik | Shell Programming and Scripting | 3 | 03-28-2008 05:00 PM |
| param with awk | itik | UNIX for Advanced & Expert Users | 1 | 03-28-2008 01:52 PM |
| replacing a line that may have different values on different servers | fed.linuxgossip | Shell Programming and Scripting | 3 | 12-31-2007 06:36 PM |
| replacing variable values in all files in directories | newtoshell | Shell Programming and Scripting | 3 | 12-30-2005 04:11 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
sed question - replacing param values
Hello, Do you have any idea why the below sed command is also replacing the value of "PARAMETER2" instead of just "PARAMETER" in file1 ? Code:
% parameter=PARAMETER
% new_value=2
% cat file1
PARAMETER=1
PARAMETER2=1
% cat file1 | sed s/[^${PARAMETER}=]*$/${new_value}/1
PARAMETER=2
PARAMETER2=2
Thanks. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|