#!/bin/bash #挺玄学的,自己试着看看 a=`cat nowcoder.txt | grep -E "[1]{7,}"` b=`echo $a | sed -e 's/[1]\{7,\}//2g'` c=`echo $b | sed -e 's/\([1]\{7,\}\)/[\1]/g' | tr -d " "` echo $c | sed 's/:/\n/g' a1=`cat nowcoder.txt | grep -E "[2]{7,}"` b1=`echo $a1 | sed -e 's/[2]\{7,\}//2g'` c1=`echo $b1 | sed -e 's/\([2]\{7,\}\)/[\1]/g' | tr -d " "` echo $c1 | sed 's/:/\n/g' a2=`cat nowcoder.txt | grep -E "[3]{7,}"` b2=`echo $a2 | sed -e 's/[3]\{7,\}//2g'` c2=`echo $b2 | sed -e 's/\([3]\{7,\}\)/[\1]/g' | tr -d " "` echo $c2 | sed 's/:/\n/g'