bug-sed
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#21511: sed not performing as specified


From: Beagleburt
Subject: bug#21511: sed not performing as specified
Date: Sat, 19 Sep 2015 18:14:45 +1200

MY MISTAKE - I MISUNDERSTOOD THE VIDEO ABOUT sed. PLEASE IGNORE MY "bug" REPORT! SORRY!

"For we have not been given a spirit of fear, but a spirit of Power; of Love; & of a Sound Mind." 2nd Timothy, chapter 1, verse 7.

On 18 September 2015 at 18:14, Beagleburt <address@hidden> wrote:
I am doing an online course "Introduction to Linux" 

edX Home Page

LinuxFoundationX: LFS101x.2 Introduction to Linux

Chapter 13: Manipulating Text; Section 2. sed & awk

~$ cat > test1
This is a Sample Test File for the sed command.
The sed command is used to edit contents in a file.
For example, the sed command is used to replace words in a line or file.
~$ sed s/is/are/ test1
Thare is a Sample Test File for the sed command.
The sed command are used to edit contents in a file.
For example, the sed command are used to replace words in a line or file.

As you can see above the 1st instance of "is" in "This" is replaced by "are" giving "Thare"; BUT the following two lines also have "is" replaced by "are" EXCEPT for the "is" after "Thare". It is ALMOST as if I had invoked the global: sed s/is/are/g test1 EXCEPT for the 2nd "is" after "Thare"?

I am using sed version: sed (GNU sed) 4.2.2

'b'ye - Bruce Gilbert.



"For we have not been given a spirit of fear, but a spirit of Power; of Love; & of a Sound Mind." 2nd Timothy, chapter 1, verse 7.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]