GNU bug report logs -
#53756
Just feature request
Previous Next
To reply to this bug, email your comments to 53756 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-sed <at> gnu.org
:
bug#53756
; Package
sed
.
(Thu, 03 Feb 2022 18:40:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Tathastu Pandya <ptathastu <at> yahoo.com>
:
New bug report received and forwarded. Copy sent to
bug-sed <at> gnu.org
.
(Thu, 03 Feb 2022 18:40:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[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 132 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.