skip to Main Content

Replace same occurrence of word with different words using sed – CentOS

I want to replace 2 same words in file(app.properties) with 2 different words using sed command. Example: mysql.host=<<CHANGE_ME>> mysql.username=testuser mysql.port=3306 mysql.db.password=<<CHANGE_ME>> required output will be mysql.host=localhost mysql.username=testuser mysql.port=3306 mysql.db.password=password123 I tried below command: sed -e "s/<<CHANGE_ME>>/localhost/1" -e "s/<<CHANGE_ME>>/password123/2" app.properties >…

VIEW QUESTION

Unable to install docker on Amazon linux – CentOS

I'm trying to install docker on Amazon Linux Ec2 instance, I get the following error. Installing docker Loaded plugins: extras_suggestions, langpacks, priorities, update-motd Cleaning repos: amzn2-core amzn2extra-docker amzn2extra-lamp-mariadb10.2-php7.2 amzn2extra-php7.2 docker-ce-stable 4 metadata files removed 0 sqlite files removed 0 metadata…

VIEW QUESTION
Back To Top
Search