Replaced single replacements with -i instead of -i -e. Added two examples of the stackable -e functionallity
1.0 KiB
1.0 KiB
Standard SED repacements
DOMAINname: shoud be replaced with $domain
Example:
sed -i 's/DOMAINname/'$domain'/' <path/to/filename>
PHPver: shoud be replaced with $phpver
Example:
sed -i 's/PHPver/'$phpver'/' <path/to/filename>
PASSword: shoud be replaced with $PASSword
Example:
sed -i 's/PASSword/'$PASSword'/' <path/to/filename>
DBName: shoud be replaced with $db_name
Example:
sed -i 's/DBName/'$db_name'/' <path/to/filename>
DBUser: shoud be replaced with $db_user
Example:
sed -i 's/DBUser/'$db_user'/' <path/to/filename>
DBPass: shoud be replaced with $db_pass
Example:
sed -i 's/DBPass/'$db_pass'/' <path/to/filename>
Replacing multiple variables within the same file:
The -e option is stackable, you can add as many as you want within a single file. Example
sed -i -e 's/DBPass/'$db_pass'/' -e 's/DBUser/'$db_user'/' <path/to/filename>
or:
sed -i -e 's/DBName/'$db_name'/' -e 's/DBUser/'$db_user'/' -e 's/DBPass/'$db_pass'/' <path/to/filename>