From owner-freebsd-questions@FreeBSD.ORG Wed Dec 12 21:19:14 2007 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE62716A419 for ; Wed, 12 Dec 2007 21:19:14 +0000 (UTC) (envelope-from maslak@ihlas.net.tr) Received: from pop3.ihlas.net.tr (smtp.ihlas.net.tr [213.238.128.249]) by mx1.freebsd.org (Postfix) with SMTP id 2797813C4EB for ; Wed, 12 Dec 2007 21:19:13 +0000 (UTC) (envelope-from maslak@ihlas.net.tr) Received: (qmail 67577 invoked by uid 89); 12 Dec 2007 21:19:13 -0000 X-Mail-Scanner: Scanned by qSheff-II-2.1 (http://www.enderunix.org/qsheff/) Received: from unknown (HELO ihlasnetym) (213.238.150.220) by 0 with SMTP; 12 Dec 2007 21:19:12 -0000 Message-ID: <015f01c83d04$a1df2b20$dc96eed5@ihlasnetym> From: "Halid Faith" To: Date: Wed, 12 Dec 2007 23:19:07 +0200 MIME-Version: 1.0 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1896 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: How to use cut or awk commands into sed command ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Dec 2007 21:19:14 -0000 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