From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f44.google.com ([209.85.128.44]) by ewsd; Tue Nov 13 15:04:12 EST 2018 Received: by mail-wm1-f44.google.com with SMTP id r11-v6so13219813wmb.2 for <9front@9front.org>; Tue, 13 Nov 2018 12:04:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:references:content-disposition :in-reply-to; bh=iJm6dVsRmaV899TYKG7XcNMp7E1l7SC4vJzu6YKcdhQ=; b=epRc7ic1nzBu02NT1UbSt4cuWLzBFEcnAMuwKpMYix+HEotifWaSYNxzbWZWQy8Djh wM2SJ0Fnn6LU3CzM3cBxr/wEZ6UQMYGt3JkFjSPbaiuDwzM4bLvlxH3FBJSqUBLPtNoP frDeojXt/AoQ8gwMCEIROZWCkCaIAmJRbaGZa0ZLbsbwVayCqsyMjhvd0U7BcwOv+lAs fGLBtQdoJYHzBVqKqMP4gdHEdOQrcI9Xehb13TXdsChdNl9CrP6WwhPoBn2+9Nc63vOO PpC271exOgoQJPXe0SEoFLiqKBbVW94oW1uYHuYeNJvfw9B5ZhEkl6+f4eZE11YvvSL4 r1nA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:references :content-disposition:in-reply-to; bh=iJm6dVsRmaV899TYKG7XcNMp7E1l7SC4vJzu6YKcdhQ=; b=S4CnRJ+xSGRukN4WEwhBj7ft9u6vwWmedZlG0rCKiwiF1h8BntrTvFfDBF/5rwurT4 n5ntKUNyy7rddOpVvqkRCamJOy3iQpttFw6iS20tNO8pUxabAPTJHMP3ktluVpY5T+Ys PwtTDDw6GRI0WB9bLTHa35N57zIjudr8Gz+cZ5Mmb2iejeNtdarNokrOo4tJYfNm+wGG k+gbQc/ZIf18AWrSPjX8Q0McaYqg06G28fXAjEWxPBrlMa7au+tzU77Nc1Pmz7w7nEXA wfv2zBLkqg9Mecb0Z2YxDevk85CC7/pfxYcYf36WWs3kNauq49FTotosqEhyp1N3MJCq sZuw== X-Gm-Message-State: AGRZ1gK24MsUvup5d7X7R7S1q9chHT33/UdvjdDyH373UWH4+a3hgZ6h lBg3i3EhC0LiHkpS79oa2oMtciCG X-Google-Smtp-Source: AJdET5dX+gtYZ1QKSE/m7s1bchokY+5QcqjiIxV9poK2qA4L+j3ituQCaGfrCo+0/U2CcME2f62bqw== X-Received: by 2002:a1c:84:: with SMTP id 126-v6mr4257601wma.96.1542139445606; Tue, 13 Nov 2018 12:04:05 -0800 (PST) Return-Path: Received: from master.localdomain (ip72-200-124-203.tc.ph.cox.net. [72.200.124.203]) by smtp.gmail.com with ESMTPSA id l186-v6sm30470293wma.13.2018.11.13.12.04.04 for <9front@9front.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Nov 2018 12:04:05 -0800 (PST) Date: Tue, 13 Nov 2018 13:04:01 -0700 From: Joe M To: 9front@9front.org Subject: Re: [9front] sed bug? Message-ID: <20181113200401.GA18169@master> References: Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: List-ID: <9front.9front.org> List-Help: X-Glyph: ➈ X-Bullshit: proven property DOM-scale injection interface Hello, umbraticus@prosimetrum.com wrote: > > This works fine, it outputs test2 > > {echo test; echo test1; echo test2} | sed '0,/^test1$/d' > > really? I get: sed: line number 0 is illegal yes, my bad. I pasted the wrong command. It should be a 1 instead of 0. > for this one: > > >{echo test; echo test1; echo test2} | sed '1,/^test$/d' # has no output > > it deletes line 1, then continues deleting lines until it finds ^test$ > which it never does. Perhaps adding a newline at the start is the quickest > way to get what you want? > > {echo; echo test; echo test1; echo test2} | sed '1,/^test$/d' > > test1 > test2 > > umbraticus I stumbled upon the same workaround too. On a similar note, this command works fine also: {echo test; echo test1; echo test2} | sed '1,1d' Thanks again