From owner-freebsd-questions@freebsd.org Sat Sep 9 01:48:49 2017 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 65785E1980B for ; Sat, 9 Sep 2017 01:48:49 +0000 (UTC) (envelope-from citrin+bsd@citrin.ru) Received: from hz.citrin.ru (hz.citrin.ru [IPv6:2a01:4f8:d16:10c3::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E12E73D37 for ; Sat, 9 Sep 2017 01:48:49 +0000 (UTC) (envelope-from citrin+bsd@citrin.ru) Received: from x220.lan (c-24-60-168-172.hsd1.ct.comcast.net [24.60.168.172]) by hz.citrin.ru (Postfix) with ESMTPSA id 929FC2C1790 for ; Sat, 9 Sep 2017 01:48:45 +0000 (UTC) Subject: Re: script code for end-line To: freebsd-questions@freebsd.org References: <59B332A3.1000205@gmail.com> From: Anton Yuzhaninov Message-ID: <88411fe0-888c-6d64-3830-a8cf5427e44b@citrin.ru> Date: Fri, 8 Sep 2017 21:48:41 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <59B332A3.1000205@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=citrin.ru; s=s0; t=1504921725; bh=Sd25vTxVrz6HLtSaTrSiYu57zfZjf3yTkBn4IUSSGag=; h=Subject:To:References:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=qUFXqMXe4s1KTHNUfr2eqm9pK6bIuT7LibJv9ANkkucFmR+JB4c9Ombplf5TN1thJSqoLhvEyxI8LfXy+hw6Ueb7knQyLVH+7g+oLEaXuLaBMXo/0i7U47mn8YWyLdm8fQPkQm3IV1UAd7+zevFvqd4xYu3MGUn0j9ZPEWjKpU4= X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Sep 2017 01:48:49 -0000 On 09/08/17 20:15, Ernie Luzar wrote: > I have a file that has blank lines with ^M in position one. > > I have thisĀ  if [ "$end-line" = "^M"]; then > > > Is that the correct way to code that between the quotes? The question looks like an XY-problem: http://xyproblem.info/ What you need to do with this file?