![]() |
|
|
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 |
| Variables | bobo | UNIX for Dummies Questions & Answers | 1 | 01-19-2007 01:37 AM |
| doing a sed on certain variables | seaten | UNIX for Dummies Questions & Answers | 10 | 09-05-2005 11:45 PM |
| doing a sed with variables | seaten | Shell Programming and Scripting | 1 | 05-06-2005 04:08 PM |
| doing a sed with variables | seaten | UNIX for Dummies Questions & Answers | 1 | 05-06-2005 03:48 PM |
| Using Variables to Set Other Variables | superdelic | UNIX for Dummies Questions & Answers | 3 | 04-21-2005 11:44 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
variables in sed
when i do something like substituting a particular thing with a system variable, i am unable to do that expect the varible name getting into that.
for ex.. i tried, sed -e 's/date/`date`/g' <if >of but i got date replaced with "`date`" and not with the actual date .. same case happened with a variable $var. Can I know where I go wrong? Thanks |
|
||||
|
well, see the example..
---------------------------- sh-2.05$ cat file date sh-2.05$ sed "s#date#`date`#" file Thu Jan 3 20:39:08 JAVT 2002 sh-2.05$ ---------------------------- i guess that's what you mean. |
|
||||
|
Well, okay.. Now for completing your HAPPINESS :)
please visit this URL, http://www.dbnet.ece.ntua.gr/~george/sed/1liners.html, i promise it will give you more info about sed. Peace, |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|