题解 | #输出第5行的内容#

输出第5行的内容

https://www.nowcoder.com/practice/1d5978c6136d4252904757b4fa0c9296

#!/bin/bash

if [ -f nowcoder.txt ]; then
    line=$(sed -n '5p' nowcoder.txt)
    echo $line
else
    echo "File nowcoder.txt does not exist."
fi

全部评论

相关推荐

10-10 11:38
已编辑
湖南理工大学 Java
小浪_Coding:多沟通叭, 公式简历+学历一般的话难找
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务