|
From: | Paolo Bonzini |
Subject: | Re: Subject:sed Insert line does not work |
Date: | Thu, 23 Sep 2004 12:29:05 +0200 |
User-agent: | Mozilla Thunderbird 0.5 (Windows/20040207) |
sed -e "32i\inserted" tmp.txt expecting to insert "inserted" at line 32, but I get the error sed: -e expression #1, char 5: Extra characters after command
What's the version of sed? One of these two should work: sed -e "32i\" -e inserted tmp.txt sed -e 32iinserted tmp.txtThe latter is a GNU extension present since GNU sed v3.02.80 (a beta for sed v4, the last one released by Ken Pizzini which is co-maintaining sed with me).
Paolo
[Prev in Thread] | Current Thread | [Next in Thread] |