GNU bug report logs - #53756
Just feature request

Previous Next

Package: sed;

Reported by: Tathastu Pandya <ptathastu <at> yahoo.com>

Date: Thu, 3 Feb 2022 18:40:01 UTC

Severity: wishlist

Full log


View this message in rfc822 format

From: Tathastu Pandya <ptathastu <at> yahoo.com>
To: 53756 <at> debbugs.gnu.org
Subject: bug#53756: Just  feature request
Date: Thu, 3 Feb 2022 18:20:48 +0000 (UTC)
[Message part 1 (text/plain, inline)]
Just as awk has FILENAME NR FNR like variables Add same feature in sed.Now sed has "F" for filename "=" for line numberBut flaw in sed is that those F and = directky ouyput to stdout.
Using debug i found above
Rather if F and = result can be made a part of pattern space we can perform many one liners wuthout mulyiple piped commands.Eg.
I want 4th line of file prepended with filenzme
currently we have to sed '4F' | some more sed command to process to merge Filename line to 4th line.

But if F and = output can be made availabk in pattern space.eg 1F would add Filename\n1st line in partten space.
or 
sed '4s/^/$F/'
Juat like awk built in variable we canuse F and = options

Sent from Yahoo Mail on Android
[Message part 2 (text/html, inline)]

This bug report was last modified 3 years and 133 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.