我是 Linux 新手,我正在尝试将路径分配到变量中,如下所示
#! /bin/bash
path=/usr/local/driveworks/tools/capture
cd path
./video_exporter ///media/uuresin/SSD3/last_record/input.lraw ~/records/output.mp4
上面的 bash 文件产生以下错误:
./trial.sh: line 5: cd: path: No such file or directory
./trial.sh: line 7: ./video_exporter: No such file or directory
答案1
我已经按如下方式修改了我的 bash 文件并且它有效!
#! /bin/bash
path=/usr/local/driveworks/tools/capture
cd $path
...