BASH:sed script

#!/bin/bash

sed '{
#remove empty line
    s/^M$//
    s/.$//
    /^$/d
    s/^!/#&/
    :a
    s/^#\(.*\)/\1/
    ta
    /^\[.*\]/ {N; s/\n/ /}
}' input.txt

猜你喜欢

转载自www.cnblogs.com/xinyueliu/p/12615649.html
今日推荐