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
    echo "================= print file $filepath end ===================="
    echo -e "\n\n\n"
else
    echo "================>$filepath is not found, print file faild"
fi

 

相关文章:

  • 2022-12-23
  • 2021-12-26
  • 2022-12-23
  • 2022-02-19
  • 2021-12-09
  • 2021-10-10
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-03-01
  • 2022-12-23
  • 2022-02-10
相关资源
相似解决方案