Assigning a path as a variable in bash file

I am new in linux and I am trying to assign a path into a variable as follows

#! /bin/bash
path=/usr/local/driveworks/tools/capture
cd path
./video_exporter ///media/uuresin/SSD3/last_record/input.lraw ~/records/output.mp4

The bash file above produces the following error:

./trial.sh: line 5: cd: path: No such file or directory
./trial.sh: line 7: ./video_exporter: No such file or directory

1 Answer

I have modified my bash file as follows and it worked!

#! /bin/bash
path=/usr/local/driveworks/tools/capture
cd $path
...
1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like