Ask a Question related to Linux / Unix Administration, Design and Development.
-
bernd #1
strange problem with sed
hy group
i know, this is a frequently question answered many times but...
i simply couldn't get it to work!
i try to substitute in sed a variable like:
echo "hammel=bammel" | sed -e "s/hammel/$HOME/"
i've read a lot about using doublequotes and stuff but i get:
$ echo "hammel=bammel" | sed -e "s/hammel/$HOME/"
sed: -e expression #1, char 11: Unknown option to `s'
maybe i'm just to stupid but i realy going crasy about this...
any help really appreciate
thanx in advance
bernd
bernd Guest
-
Strange Problem
Dear All: I have used MySQL as prototype on an application that I am developing. The project has been approved and I am now moving to Oracle for... -
Strange Problem with XML
Hi I am retrieving information from a DB in XML but in a field I have an international number +331234567 but when I am loading the file with... -
Strange FDF problem
I am developing an fdf that fills in 3 form values into my pdf, and am having some strange problems. First off, this project is sort of an... -
Strange problem on IE6
I have created a movie with Flash Pro 8. Strange problem is that on some computers (not all of them), it seams that all objects that have filters... -
[PHP] Strange Problem
This is an IIS issue. The install.txt has specific information on this topic, have a look. Also, this comes up a lot and the following bug report... -
Warren Block #2
Re: strange problem with sed
bernd <bernd@thebc.ch> wrote:
Hint:> $ echo "hammel=bammel" | sed -e "s/hammel/$HOME/"
> sed: -e expression #1, char 11: Unknown option to `s'
echo "s/hammel/$HOME/"
--
Warren Block * Rapid City, South Dakota * USA
Warren Block Guest
-
John Wingate #3
Re: strange problem with sed
Warren Block <wblock@wonkity.com> wrote:
> bernd <bernd@thebc.ch> wrote:>> $ echo "hammel=bammel" | sed -e "s/hammel/$HOME/"
>> sed: -e expression #1, char 11: Unknown option to `s'> Hint:You are not limited to using "/" as the delimiter. Warren's hint shows> echo "s/hammel/$HOME/"
why another delimiter may be useful at times. Bernd will have better
luck with:
echo "hammel=bammel" | sed -e "s:hammel:$HOME:"
(if there are no colons in "$HOME").
--
John Wingate Language serves three functions. One is to
[email]johnww@worldpath.net[/email] communicate ideas, one is to conceal ideas, and
the third is to conceal the absence of ideas.
--Otto Jespersen
John Wingate Guest



Reply With Quote

