0

function test{ echo "hello";} is not able to execute in karaf shell.

Error : Command not found: function

  • Where did you discover this idea of functions in the shell? Karaf is telling you that the gogo shell doesn't understand the idea. There is no 'function' command. – Richard May 10 '17 at 09:35
  • I am using Jboss fuse facing this issue http://stackoverflow.com/questions/43803936/jboss-fuse-6-3-0-redhat-187-fabric-ssh-script-error-command-not-found-functio – chittaranjan May 10 '17 at 09:38

1 Answers1

0

I'm not familiar with Apache Karaf but I do know that the function syntax that you have used is non-standard. It is supported by Bash but not all other shells.

The standard function syntax in the shell is simply:

test() { echo "hello"; }

I would suggest using it everywhere.

Tom Fenech
  • 72,334
  • 12
  • 107
  • 141