替換文件中的字符串
sed -i "s/oldstring/newstring/g" `grep oldstring -rl /tmp/mydir`
shell腳本中替換字符串
#!/bin/bash
str='hello oldstring!'
dist="${str/oldstring/newstring}"
echo $dist
替換文件中的字符串
sed -i "s/oldstring/newstring/g" `grep oldstring -rl /tmp/mydir`
shell腳本中替換字符串
#!/bin/bash
str='hello oldstring!'
dist="${str/oldstring/newstring}"
echo $dist
集羣GFS2文件系統 一、創建分區 分區同步 必須加入集羣節點,否則無法完成下面的實驗 二、創建GFS2文件系統 1、創建GFS2 2、掛載 3、下載gfs2.img.xz 三、擴展GFS2