鱼C论坛

 找回密码
 立即注册
查看: 2490|回复: 1

这读代码什么意思,求前辈指导

[复制链接]
发表于 2018-8-2 22:33:10 | 显示全部楼层 |阅读模式
30鱼币
  1. # 6sku_event_1-300
  2. event=$1
  3. collect_path=$2
  4. label_file=$3
  5. out_path=$4
  6. mkdir -p ./process_result
  7. bash ./video_segmenter.sh \
  8.         -i $collect_path \
  9.         -m $label_file \
  10.         -o ${out_path}/${event} \
  11.         -d 100 -r 500 -f "jpg" -n 12
复制代码

想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

发表于 2018-8-3 16:01:50 | 显示全部楼层
$1 是执行代码时间传递的第一个参数
举个例子,如果这个代码的的文件名是:test.sh
如:
bash  test.sh  a b c d
$1就是a 那么event=$1 = a
$2 就是 b collect_path=$2
$3 就是c  label_file=$3
$4 就是d out_path=$4

  1. bash ./video_segmenter.sh \
  2.         -i $collect_path \
  3.         -m $label_file \
  4.         -o ${out_path}/${event} \
  5.         -d 100 -r 500 -f "jpg" -n 12
复制代码

就是:
bash ./video_segmenter.sh -i b  -m c  -o d/a -d 100 -r 500 -f "jpg" -n 12
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-4-19 19:15

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表