牛客341092378号
牛客341092378号
全部文章
分类
题解(14)
归档
标签
去牛客网
登录
/
注册
jrenezr
全部文章
(共6篇)
题解 | #打印字母数小于8的单词#
#!/bin/bash read line < nowcoder.txt for i in linedoif[line do if [ linedoif[{#i} -lt 8 ];then echo $i fi done
bash
2022-06-03
0
188
题解 | #输出第5行的内容#
exec 0< nowcoder.txt num=0 while read line do num=[[[num + 1] if [ num−eq5]thenechonum -eq 5 ] then echo num−eq5]thenecholine fi done
bash
2022-05-30
0
227
题解 | #输出7的倍数#
#!/bin/bash for ((num=0;num<=500;num++)) do if [ [[[num % 7] -eq 0 ] then echo $num fi done
bash
2022-05-30
0
277
题解 | #输出7的倍数#
for ((num=0;num<=500;num++)) do if [ [[[num % 7] -eq 0 ] then echo $num fi done
bash
2022-05-30
0
212
题解 | #打印文件的最后5行#
num=0 while read line || [ -n "${line}" ] do num=[[[num + 1] done < nowcoder.txt while read line || [ -n "line"]doif[{line}" ] do if [ line"]doif[n...
bash
2022-05-30
0
286
题解 | #打印文件的最后5行#
sed ':start;q;N;6,q;N;6,q;N;6,D;b start' nowcoder.txt
bash
2022-05-28
0
256