How to pass * as part of argument string to script?

Bo Berglund bo.berglund at gmail.com
Thu Aug 26 08:33:26 UTC 2021


On Thu, 26 Aug 2021 09:23:41 +0200, Bo Berglund <bo.berglund at gmail.com> wrote:

>What am I missing here?

FOUND A SOLUTION!
-----------------
As a last ditch test I tried to add eval to the command:

videofiles=$(eval $videofilescmd)

and now the result is this during debug:

$ prunevideos 4 "2021-08-2*.mp4"
Count = 4
Template = 2021-08-2*.mp4
Listcmd = prunelist 4 "2021-08-2*.mp4"
Videos to remove:
2021-08-23_00.mp4
2021-08-23_12.mp4
2021-08-23_18.mp4
2021-08-24_00.mp4
2021-08-24_06.mp4
2021-08-24_12.mp4
2021-08-24_18.mp4
2021-08-25_00.mp4
rm 2021-08-23_00.mp4
rm 2021-08-23_12.mp4
rm 2021-08-23_18.mp4
rm 2021-08-24_00.mp4
rm 2021-08-24_06.mp4
rm 2021-08-24_12.mp4
rm 2021-08-24_18.mp4
rm 2021-08-25_00.mp4

I will now remove the debug state so only valid output is generated.


-- 
Bo Berglund
Developer in Sweden





More information about the ubuntu-users mailing list