D
D
Drno2022-03-10 22:04:10
Android
Drno, 2022-03-10 22:04:10

How to correctly specify a variable in a script?

Good day. I need to first move the files from VIDEO_FILE_PATH to another folder, and then upload all this to the nextcloud ..
curl swears, which is logical.
How to pass file names to it correctly?

actual code

RECORDINGS_DIR=/config/recordings;
VIDEO_FILE_PATH=$(find $RECORDINGS_DIR -name *.mp4);
mkdir -p /config/rec;
curl -u login:pass -T  имя файла https://site.com/remote.php/dav/files/login/upload/
rm -f $VIDEO_FILE_PATH;

Answer the question

In order to leave comments, you need to log in

3 answer(s)
G
GavriKos, 2016-05-15
@WalloutDay

Array size posX and posY - not set.
Iterating over the enemy array is kind of strange in general. Are you sure that the condition ==?

A
Alexander Karabanov, 2022-03-10
@Drno

RECORDINGS_DIR=/config/recordings

curl -u login:pass -T "{$(echo $RECORDINGS_DIR/*.mp4 | tr ' ' ',')}" \
https://site.com/remote.php/dav/files/login/upload/

K
ky0, 2022-03-10
@ky0

findgives you a list of files. Obviously, some kind of cycle is needed in which these files will participate one by one.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question