1

Okay, this is almost a pure duplicate ... with one little piece of information that I just don't understand.

The original question is: Sed Explanation: sed '/./,$!d' file

And relates to the following:

sed '/./,$!d' file

The explanation at that question is really good except for one thing (and I don't have the reputation to post a comment to the answer to ask for an expansion). what is the meaning of the comma?

I know this seems like a waste (a whole new question) but I have not been really able to figure it out otherwise (regex documentation argh! lol).

1

A comma in sed separates so called addresses in the address range.

/./,$ means "From a line containing a character to the last line".

2
  • Thanks. That one small piece of information was all that was missing. – Brian Withnell Jul 29 '19 at 19:26
  • "Thanks" on StackExchange = upvote / accept. – choroba Jul 29 '19 at 20:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.