#!/bin/bash mkdir /opt/script && cd /opt/script head -c 1000 /etc/profile > head.txt tail -c 1000 /etc/profile > tail.txt wc -l head.txt >> wc.txt wc -l tail.txt >> wc.txt sort -k 1 wc.txt
如果是你所要的结果,请采纳