![]() |
|
|
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 |
| Storing commands in $variables. | Paulw0t | Shell Programming and Scripting | 7 | 08-08-2008 06:42 PM |
| Referencing variables in commands | mharley | Shell Programming and Scripting | 3 | 03-31-2005 02:37 AM |
| Passing variables/arguments/parameters to commands | Perderabo | Answers to Frequently Asked Questions | 0 | 06-13-2004 08:37 PM |
| Subtracting Variables which are commands | Astudent | UNIX for Dummies Questions & Answers | 2 | 03-30-2001 10:55 AM |
| Subing Variables with commands. | Astudent | UNIX for Dummies Questions & Answers | 1 | 02-26-2001 05:02 AM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Using variables in sed commands
Hi there, I need to be able to put the hostid of my box into a file (replacing the text "enter_hostid_here" so i tried Code:
sed -e 's/enter_hostid_here/`hostid`/g' inputfile > outputfile but it takes the `hostid` literally as text .....how can I get this info into the file (ideally in a single line) I notice also that you cant call $VARIABLES in sed statements either as they too are taken literally any help would be great Cheers |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|