Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Dec 2007 23:19:07 +0200
From:      "Halid Faith" <maslak@ihlas.net.tr>
To:        <freebsd-questions@freebsd.org>
Subject:   How to use cut or awk commands into sed command ?
Message-ID:  <015f01c83d04$a1df2b20$dc96eed5@ihlasnetym>

next in thread | raw e-mail | index | archive | help
I have a file named file1 which contains some values.
I want to replace some strings into it, so I use sed command but I get =
an error.

sed "s#oldstring#`cut -d, -f3 file2`#"  file1

sed: 1: "s/yenidomain2/f0b2875d- ...": unterminated substitute in =
regular expression

also I get an error with awk command into sed;
sed "s#oldstring#`awk -F, '{print$3}' file2`#"    file1
sed: 1: "s#yenidomain2#f0b2875d- ...": unterminated substitute in =
regular expression







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?015f01c83d04$a1df2b20$dc96eed5>