shell 输出文件内容

前端之家收集整理的这篇文章主要介绍了shell 输出文件内容前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
cat $filepath | while read line; do echo $line ; done
#!/bin/bash

#filepath=/opt/jenkins_home/workspace/dev-demo-haha/target/classes/application.yml
filepath=$1
if [ -f $filepath ]; then
    echo -e "\n\n\n"
    echo ================= print file $filepath start ====================cat $filepath | while read line; do echo $line ; done
    ================= print file $filepath end ===================="
else
    ================>$filepath is not found,print file faildfi

 @H_502_49@

猜你在找的Linux相关文章