标签:随机数 qiniu tab jdb false als $2 end auth
原始文件networks:
default:
ipam:
config:
- gateway: 10.255.3.1
subnet: 10.255.3.0/24
driver: default
services:
authorization:
depends_on:
- database
environment:
ENABLE_AUTHORIZATION: ‘false‘
JDBC_URL: jdbc:h2:tcp://database:1521/uaa;DATABASE_TO_UPPER=false;DB_CLOSE_DELAY=-1
SEAHORSE_ADMIN_EMAIL: seahorse-admin@deepsense.ai
image: seahorse-authorization:01aa3905657af84c5dd2db1b9932ebaddd446df2
现在需要将seahorse-authorization这段替换为quay-mirror.qiniu.com/deepsense_io/seahorse-authorization:1.4.3
脚本如下
#!/bin/bash
#author:jack
#date:20190813
test01=`ack seahorse-authorization docker-compose.yml | awk -F ": " ‘{print $2 $3}‘`
test02=quay-mirror.qiniu.com/deepsense_io/seahorse-authorization:1.4.3
sed "s#$test01#$test02#g" docker-compose.yml
sed ‘s/127.0.0.1/0.0.0.0/g‘ docker-compose.yml
test01是一个随机数组 test02 是一串字符
所以test02也采取为传参的形式
标签:随机数 qiniu tab jdb false als $2 end auth
原文地址:https://blog.51cto.com/lovejxs/2429151