bash script fails with "function: not found" error on Debian 7 virtual machine
Hello everyone,
I am having problems figuring this out. This script below is supposed to create a list of file names with their "md5sum", in a file "lib-list.txt" When I run it (sh component-list.sh) I get this: component-list.sh: 4: component-list.sh: function: not found component-list.sh: 5: local: not in a function Interestingly, I have run it in debug mode (bash -x component-list.sh) and it populated the said text file with a list of lib files Am running it on Debian 7. Here is the script: Code:
#!/bin/bash Thank you. |
probably you need to execute it as bash <scriptname> instead of sh <scriptname>, or just <scriptname>
|
Hi pan64,
Thanks so much for your quick and helpful response. Regards, Joe |
All times are GMT -5. The time now is 04:59 PM. |