Talk:Sed

message: :Header added. —Nils von Barth (nbarth) (talk) 00:57, 13 October 2009 (UTC)
thread_title:  Reference for claim? 

message: :Header added. —Nils von Barth (nbarth) (talk) 00:57, 13 October 2009 (UTC)
thread_title:  Cheat sheet 

message: :Header added. —Nils von Barth (nbarth) (talk) 00:57, 13 October 2009 (UTC)
replies: text: The disambiguation page can be found at the top of this page. IMO this is by far the most common usage of the word. --Kompik 15:39, 4 October 2007 (UTC)
thread_title:  Primary page? 

message: Sed is not faster than AWK. Sed's "regular" expressions aren't regular (see Regular_expression, since it allows back-references. As a result, strings can not necessarily be matched in sub-exponential time.
Also, in my personal experience, gawk is faster than GNU sed for simple grep-like tasks.
Serviscope Minor 00:55, 4 December 2007 (UTC)
thread_title: Sed not faster than Awk

message: I think this page should be moved, possibly to SED (software), or another name, to allow the SED disambiguation page to take the SED name. There are other things referred to as SED that are much bigger than the UNIX software. For example, the flat panel display technology called SED (Surface-conduction electron-emitter display) is the main contender (along with OLED) to replace LCD and plasma displays. So SED will be up there with LCD and LED.--Lester 10:01, 4 December 2008 (UTC)
replies: text: But SED already goes to the disambiguation page (and the software is called sed, not SED). --Zundark (talk) 10:11, 4 December 2008 (UTC)
thread_title:  Suggest page move 

message: The tr command provided in the Samples section does not do the same as the corresponding sed command.  The tr command removes all line breaks, exchanging them with whitespace, while the sed command removes every line break that is succeeded by a whitespace on the next line (but doesn't add extra whitespace). 192.100.124.219 (talk) 11:08, 9 July 2009 (UTC)
replies: text: sure, I remove the tr example. coco (talk)  —Preceding undated comment added 08:19, 30 July 2009 (UTC)
thread_title: sed / tr example is wrong

message: I’ve created a Wikibook on sed (wikibooks:sed) – many edits to the ’Pedia sed page are non-encyclopedic, providing (admittedly useful) examples which are better suited to ’Books. Hope the new book meets with approval, and feel free to move content better suited to ’Books to the book!
:—Nils von Barth (nbarth) (talk) 01:00, 13 October 2009 (UTC)
thread_title:  Wikibook 

message: The title has it all, I guess... Is it acceptable for a reference link to be in another language? This should probably go to the russian wikipedia page of "sed".
Additionally, I could not see who made this change (how do I see who edited "that" part of an article?), but if someone uses "livejournal.com", please ask him at least make an intro in english. Thanks!  —Preceding unsigned comment added by 85.72.161.183 (talk) 20:22, 29 November 2009 (UTC)
thread_title:  Link to exotic example 'tetris.sed' in russian? 

message: :"minised was used by the GNU Project until the GNU Project wrote a new version of sed based on the new GNU regular expression library."
What's the GNU regular expression library? --Abdull (talk) 20:35, 16 February 2010 (UTC)
thread_title:  GNU regular expression library? 

message: Can anyone verify syntax in the "XML table into a CSV file" example is correct? Can anyone provide sample "XML table" input, and resulting "CSV file" output? If cannot be verified, maybe that complex example should be removed? 71.212.118.46 (talk) 05:53, 4 March 2013 (UTC)
replies: text: Same question. 71.212.127.161 (talk) 02:06, 14 April 2013 (UTC)

text: I don't see any mistake in the syntax. The more serious problem is that it appears to be original research and makes various unstated assumptions about the input file format. For example, that it does not have a single root element and that the elements are nicely indented. I'd prefer to leave it out and put a link to sedtris in the external links section. 2001:558:6045:1D:56E:DCCB:ED9D:24EA (talk) 03:37, 4 May 2013 (UTC)
replies: text: Thanks for striking the XML example. It seemed problematic as an example. I did move the sedtris example to what seems a better location in the article. 71.212.121.140 (talk) 22:03, 21 May 2013 (UTC)
thread_title:  Can anyone verify "XML Table" example is correct? 

message: The article does not discuss if SED sets an exit code (e.g., to indicate if the substitution happened or not) upon termination of program execution.  I did find a statement in the GNU documentation (see the "External Links" section in the article), in the 'q' command description, of "The ability to return an exit code from the sed script is a GNU sed extension.", which implies other (most?) versions do not return an exit code?  — Preceding unsigned comment added by Dan Aquinas (talk • contribs) 18:06, 12 June 2013 (UTC)
replies: text: I am pretty sure all versions of sed return an exit code, but it has nothing to do with whether a substitution happened. The exit code is 0 if sed runs OK (does not crash), something else (usually 1) if sed crashes. For example, "sed s/xxx/yyy" has a syntax error (no trailing slash), so sed "bails out", returning 1. The exit code usage is the same as that for basically any Unix command, so it is not a big deal that the article does not discuss. As mentioned, GNU extensions allow you to specify your own exit code as part of the q or Q command. 71.212.122.128 (talk) 07:02, 15 July 2013 (UTC)
thread_title:  SED and Exit Codes 

message: I have some concerns about some of the recent edits in late August - early September.
First, I find the added theoretical discussion about how sed is "data-driven", and "imperative" unhelpful. I've used sed (and various programming languages) for decades. But I find the theoretical discussion confusing. So I pity the more general reader. sed is so different from mainstream programming languages such as C, perl, etc. So it's difficult to shoehorn sed into general categories. I have actually done "data-driven" programming. I disagree that it's helpful (or totally correct) to view sed as data-driven. As clearly stated in a comment, "Data-driven programming is a paradigm where the processing is controlled by values in data tables, rather than in program logic". The text processed by sed is NOT a data table. The sed script is more "program logic" than it is a "data table". Overall, to help the reader better understand sed, I think it's better to focus on what sed does, instead of potentially controversial / ambiguous theoretical discussions.
Second, I think it is best if we avoid saying "perl largely replaced sed" and other such comparative statements. These comparative statements have the potential to get into a "religious war". If the article becomes a "language comparison", there will be too much subjectivity and argument potential. sed, perl, awk, etc. are all useful. And they are rather different. I think it is a slippery slope discussing or implying which one is "better". 71.212.122.219 (talk) 21:49, 15 September 2013 (UTC)
thread_title:  Concerns about theoretical text and language comparisons 

message: I reverted the large edits from July 11 and July 12. The edits increased the size of the article from 19,174 to 21,474 (a huge 12% increase), totally limited to the "Hello, world! example" section, and significantly damaged the article, as far as I could see. Given the obvious effort and good faith by the editor, I think it deserves to be explained why a reversion is called for.
First, other language articles only rarely have multiple "Hello, world!" examples. And if so, only for a really good reason. Most such sections are brief. There is no good reason for such a bloated "Hello, world!" section for sed.
The first added example (labeled "trivial") is not really a "Hello, world!" example, since the result depends on bash. The obscure bash "here string" syntax will certainly be confusing for most readers. This is an article about sed, not bash. The example actually says little or nothing about sed, since cat would work equally well. The edit says "evaluating a sed script on an empty file (such as produced by touch) blocks". That is an error. Try "touch brandnew; sed "" < brandnew". It does NOT block. The second point supposedly illustrated by the example ("Implicit default behavior is to match every line") is NOT illustrated by the example, so is just confusing verbiage. Finally, sed is NOT "data-driven", though the editor apparently disagrees. This has been discussed before. In any case, to help the reader better understand sed, I think it's better to focus on what sed does, instead of potentially controversial / ambiguous theoretical discussions about "data-driven".
The second added example (labeled "substantive") doesn't really add anything worth all the extra space. And the example is NOT quite similar to the AWK example, which uses BEGIN, which of course sed has nothing similar, so another confusing misstatement.
The final added example (labeled "sophisticated") just bogs the article down, since .* is totally redundant, as admitted by the editor. Hence the example is NOT "sophisticated", it's just the opposite, and a bad example. Finally, the remark about = command is out of context, since = is NOT used in the example. Talking about = in the middle of the example is disjointed and confusing.
Please do not take my remarks the wrong way. It helps having people look for improvements in the article, so please continue. But please do not try these kinds of massive edits. I'm sure you spent a lot of time. I had to spend a lot of time writing this. Given that you made so many errors, it's presumptuous of you to think you can overhaul this article. All the extra text did not improve the article, just bloated it up and made it more difficult to read. 71.35.174.206 (talk) 09:24, 25 July 2015 (UTC)
thread_title:  Rationale for reverting very large edits 

message: IRC users might do
    <Blacksilver> Deblirvately msipelsled
    <Blacksilver> s/Deblirvately msipelsled/Deliberately misspelled/
To say "Oops, this is what I meant."
Additionally, Discord has a fascinating feature: you can type the same thing, and it will do the edit for you!
There is no documentation for this as far as I can find. Perhaps we should add these (maybe not as in pop. culture)
174.138.203.63 (talk) 15:18, 18 June 2017 (UTC)
thread_title:  In popular culture... 

message: Should not the first example at "Other simple examples" include g in the sed instruction:
sed -i s/yourpassword/REDACTED/g ./status.freenode.log
...or else it would only substitute the first ocurrence of 'yourpassword' per line? -- Genoskill (talk) 20:40, 10 May 2021 (UTC)
thread_title:  "any instance of a certain word" example