Send notification from command line [duplicate]

The following works:

osascript -e 'display notification "Hello world!" with title "Hi!"'