Rustmilian@lemmy.world to linuxmemes@lemmy.worldEnglish · 6 months ago"LiNuX uSeR iNsTaLlInG A BrOwSeR haha" meanwhile :lemmy.worldimagemessage-square195fedilinkarrow-up11.12Karrow-down124file-text
arrow-up11.1Karrow-down1image"LiNuX uSeR iNsTaLlInG A BrOwSeR haha" meanwhile :lemmy.worldRustmilian@lemmy.world to linuxmemes@lemmy.worldEnglish · 6 months agomessage-square195fedilinkfile-text
minus-squaredezmd@lemmy.worldlinkfedilinkEnglisharrow-up4·6 months agoWhat if I told you you can make a backup of a config file and edit a single line in a conf file, all with a single line of bash? sudo cp config.conf config.conf.bak.$(date +"%Y%m%d%H%M%S") && sed -i 's/^\(CONFIG_NAME\s*=\s*\).*/\1new_value/' config.conf
What if I told you you can make a backup of a config file and edit a single line in a conf file, all with a single line of bash?
sudo cp config.conf config.conf.bak.$(date +"%Y%m%d%H%M%S") && sed -i 's/^\(CONFIG_NAME\s*=\s*\).*/\1new_value/' config.conf