Commands Work But Not In Script... " find: invalid number"
Posted: August 5th, 2022, 11:11 am
Hi All,
I'm a bit new to this and I have a very simple command line I run to pull files that are greater than 1GB to a different DIR. When I bundle this up into a sh, SAB tells me that the size is incorrect.
Probably more of a Linux question than a SAB one, but does anyone know why?
From the SAB console: "ScriptExit(1) find: invalid number '1G'"
Again, runs fine if I dump in exactly what SAB is passing to it.
Appreciate your help.
I'm a bit new to this and I have a very simple command line I run to pull files that are greater than 1GB to a different DIR. When I bundle this up into a sh, SAB tells me that the size is incorrect.
Probably more of a Linux question than a SAB one, but does anyone know why?
Code: Select all
#!/bin/bash
find "$1"/ -type f -size +1G -exec mv -f {} /home/downloads/dl \;
Again, runs fine if I dump in exactly what SAB is passing to it.
Appreciate your help.