该如何用语句去编写呢

img


该如何用linux的语句去编写这些问题?
第一步,cd /opt 第二步,mkdir script
第三步,cat /etc/profile 第四步,vim profile
然后就不知道啦


#!/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

如果是你所要的结果,请采纳