Article 5QRYM Gnu sed can do command e execute a bash function increasing number

Gnu sed can do command e execute a bash function increasing number

by
BudiKusasi
from LinuxQuestions.org on (#5QRYM)
How gnu sed can e execute a bash function increasing a counter value as
Code:$ k(){ ((i++)); echo $i ;} ;export -f k
$ i=; echo -e 'oAo\nooAo\nAo' | sed -E '/A/e k'
1
oAo
1
ooAo
1
AoFail instead of doing a counter correctlylatest?d=yIl2AUoC8zA latest?i=Dl9I7PIAe3A:5M-ZxaXAY2c:F7zBnMy latest?i=Dl9I7PIAe3A:5M-ZxaXAY2c:V_sGLiP latest?d=qj6IDK7rITs latest?i=Dl9I7PIAe3A:5M-ZxaXAY2c:gIN9vFwDl9I7PIAe3A
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments