![]() |
|
|
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 |
| Shell script question on variables | figaro | UNIX for Dummies Questions & Answers | 2 | 04-04-2009 06:09 AM |
| Awk/shell question: Read from file and assign to variables. | akbar | Shell Programming and Scripting | 3 | 05-07-2008 07:10 PM |
| Question about variables | wswaner | UNIX for Dummies Questions & Answers | 0 | 01-17-2007 11:52 PM |
| A question on C programming and Outputing variables | HelpMeIAmLost | High Level Programming | 2 | 12-05-2003 03:08 PM |
| Question variables Korn | frank | Shell Programming and Scripting | 1 | 11-05-2001 12:01 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
question about variables with sed
Hi,
I am trying to do some mass replacements in lots of scripts, and using sed. However sed doesn't seem to like to be able to dereference variables within the substitute clause. For example: tab=newtable cat f1 | sed 's/oldtable/$tab/g' doesn't work. it would replace oldtable with the literal ( $tab ). I've tried quoting out the $, using eval etc.. but nothing seems to work. Any ideas are appreciated. Thanks, floyd |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|