ip a| grep noprefixroute | awk '{print $2}' | awk -F/ '{print $1}'
192.168.4.52

shell 正则-完全匹配
grep -E '^#bind([0-9]{1,3}(.[0-9]{1,3}){3})' /etc/redis/6379.conf

grep -E '^#bind([0-9]{1,3}(.[0-9]{1,3}){3})' /etc/redis/6379.conf

!/bin/bash

VIP=ip a| grep 192.168.4.5 | awk '{print $2}' | awk -F/ '{print $1}'
sed -i "70s/127.0.0.1/$VIP/" /etc/redis/6379.conf
sed -i '815s/#//' /etc/redis/6379.conf
sed -i '823s/#//' /etc/redis/6379.conf
sed -i '829s/#//' /etc/redis/6379.conf
sed -i '829s/15/5/' /etc/redis/6379.conf


8s7k82mu
1 声望0 粉丝

« 上一篇
mysql-面试-DQL

引用和评论

0 条评论