-2
 ======KVM 虚拟化手册======
=====简介=====
=====安装和配置kvm虚拟化=====
====检查是否支持KVM====
====安装kvm虚拟化平台====
====配置nested virtualization====
==== 配置网络====
====重启系统并检查相关配置====
=====virsh创建 & 安装虚拟机=====
====通过VNC进行安装====
=====REFERENCE=====
  1. The lines which begin with"=" and end with "="
  2. add - at the end of the left "=", like:

    ===== - REFERENCE=====
    

How can I do ? thks ...

mrco
  • 179
  • 6

1 Answers1

2
sed '/^=.*=$/ s/=\+/& - /' file

The first bit is "for each line that starts and ends with =".
The second bit is "replace the first sequence of = with: itself space dash space".

glenn jackman
  • 4,630
  • 1
  • 17
  • 20