-
Hey all, I am trying to run the script from here but have problems running it.. I prob. just dont understand arguments for bash scripts. The command I try is I am trying to test it with just one file so I'd like 5%. I get an error though: I think my arguments for the FS of the cache drive are incorrect.. Maybe someone can point me in the right direction here. Thanks alot :) |
Beta Was this translation helpful? Give feedback.
Answered by
Br33ce
Mar 7, 2024
Replies: 1 comment 17 replies
-
What shell are you using? |
Beta Was this translation helpful? Give feedback.
17 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've found the error and it was something specific to "my" system. I checked the output of the while conditions,yes:
root@NAS-Breece2:~# df --output=pcent /srv/dev-disk-by-uuid-fafc3b71-0e57-42e5-a 497-1067a8bac008 Verw% 1%
Most of my Debian appears to be in english, but SOME things are as per my location in GERMAN. So it does not result in USE% but in Verw% (Verwendung is Usage in German)... Ofc. grep cant work with that...
With the corrected line
while [ $(df --output=pcent "${CACHE}" | grep -v Verw | cut -d'%' -f1) -gt ${PERCENTAGE} ]
everything works as its supposed to. I hope this might help others. Thank you very much for the assistance!