[colug-432] sed basics

jep200404 at columbus.rr.com jep200404 at columbus.rr.com
Thu May 14 23:00:15 EDT 2015


On Thu, 14 May 2015 20:38:28 -0400, Steve VanSlyck <s.vanslyck at postpro.net> wrote:

> # -i     - edit the file in place
> # -i.bak - after making a backup with the extension ".bak"

Those are dangerous,
especially before you know things are working correctly. 

First, try the boring way:

    sed 's...' sshd_config >sshd_config.new
    diff sshd_config sshd_config.new

> # Let's see if it worked
> diff ./sshd_config.bak ./sshd_config

Put some eyeballs on those files. 

What character is between PermitRootLogin and yes?
A blank or a tab character?
How can you see the difference?

Go to the Pytho Dojo to play.
Plenty of Linux command line goodness happens there.
cohpy.org



More information about the colug-432 mailing list