Bash function parameter
Hello,
I try to make all my MP3s lowercase with a shell script. I know there are probably tons of solutions out there but I want to code it on my own. I thought of a recursive function like this: Code:
#!/bin/sh PS: I haven't gotten around to check for that lowercasing - but I would appreciate some hints there as well ;) Thank you in advance -Misel |
okiedokie, I've managed it.
What had the programmer of Bash in his mind when he implemented the functions???? Code:
#!/bin/sh directory is a global variable. but I need it to be private to the function. any ideas? |
Qoute from the bash man page:
"Variables local to the function may be declared with the local builtin command. Ordinarily, variables and their values are shared between the function and its caller." I guess, the reason you need a function-local variable, is because you are recursively wandering through the directories. You may find it nicer to have the "find" utility handle the recursive directory search. Something like: Code:
#!/bin/sh |
All times are GMT -5. The time now is 07:41 AM. |