Thanks for taking the time to report your issue and help improve Ubuntu.
The reason it does this is because "function" is a bash-ism and /bin/sh
on debian/ubuntu is dash, which is a lighter, more posixly strict bourne
shell.
If you prefix your script with #!/bin/bash like so:
#!/bin/bash
function dummyfn ()
{
echo This is a dummy message, displayed by a dummy.
}
dummyfn
then it will work correctly, or you can use the non bash-centric form of
function declarations by just doing:
#!/bin/sh
dummyfn ()
{
echo This is a dummy message, displayed by a dummy.
}
dummyfn
Closing as not a bug.
** Changed in: bash (Ubuntu)
Status: New => Invalid
--
Any function definition makes bash crash
https://bugs.launchpad.net/bugs/368800
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs