[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#53756: Just feature request
From: |
Tathastu Pandya |
Subject: |
bug#53756: Just feature request |
Date: |
Thu, 3 Feb 2022 18:20:48 +0000 (UTC) |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#53756: Just feature request,
Tathastu Pandya <=