I am creating a bash script that installed VSFTPD / FTP. After the installation some configuration is required in the "/etc/vsftpd/vsftpd.conf" file.
This includes making sure the following lines are set to this:
anonymous_enable=NO
local_enable=YES
chroot_local_user=YES
What would be the best approach for scripting a way for these edits to be made post installation?
sed
– Arkadiusz Drabczyk Nov 24 '14 at 16:04sed
supportsed -c
, withgnu sed 4.2.2
I'm gettingsed: invalid option -- 'c'
. Also, if those keys are commented in the original file (or missing) thesed
solution below will not give you the end result that you actually need. – don_crissti Nov 24 '14 at 23:31