Re: [BackupPC-users] OT: (e.g.) sed command to modify configuration file

2009-09-28 Thread Chris Robertson
Timothy J Massey wrote: > Hello! > > I have a shell script that I use to install BackupPC. It takes a standard > CentOS installation and performs the configuration that I would normally > do to install BackupPC. There are probably way better ways of doing this, > but this is the way I've chose

Re: [BackupPC-users] OT: (e.g.) sed command to modify configuration file

2009-09-25 Thread Davide Brini
On Friday 25 September 2009, Timothy J Massey wrote: > Hello! > > I have a shell script that I use to install BackupPC. It takes a standard > CentOS installation and performs the configuration that I would normally > do to install BackupPC. There are probably way better ways of doing this, > but

Re: [BackupPC-users] OT: (e.g.) sed command to modify configuration file

2009-09-25 Thread Jim Wilcoxson
Try this: [...@amd backup]$ cat x #Example of a greatly reduced sshd_config #Protocol 2,1 Protocol 2 #Additional lines here #PermitRootLogin yes #Additional lines here [...@amd backup]$ sed 's/[# ]*Protocol/Protocol/;s/Protocol/#Protocol/;$aProtocol jw' x #Example of a greatly reduced sshd_config

Re: [BackupPC-users] OT: (e.g.) sed command to modify configuration file

2009-09-25 Thread Jim Wilcoxson
Well, that didn't work - Gmail broke the line. There should be a space after the #, so that any number of spaces and hashes will be removed. Jim On 9/25/09, Jim Wilcoxson wrote: > Try this: > > [...@amd backup]$ cat x > #Example of a greatly reduced sshd_config > #Protocol 2,1 > Protocol 2 > #A