比如绝对路径是/root/autoHls/streamID

因为脚本里面想直接用这个streamID来推流 下面是方法

#!/bin/bash
dir="/root/autoHls"
dir2=`echo $dir | sed "s/\// /g"`
dir2=`echo $dir2| awk 'NR==1{print $NF}'`
echo $dir2

 

相关文章:

  • 2021-10-23
  • 2022-12-23
  • 2021-09-18
  • 2022-12-23
  • 2021-11-10
猜你喜欢
  • 2022-02-24
  • 2021-10-09
  • 2022-12-23
  • 2022-12-23
  • 2021-05-26
  • 2021-09-04
  • 2022-12-23
相关资源
相似解决方案