I want to define this function:
displayInfo (){ echo "Hi";cal;date }
But after pressing enter, this is what I see:
>
What's the problem?
I want to define this function:
displayInfo (){ echo "Hi";cal;date }
But after pressing enter, this is what I see:
>
What's the problem?
When you're defining a function on a single line, you need a
;
to signify the end of the commands:Alternatively, you can do it on multiple lines:
Add a semicolon after "date":
In your code the bash interpreter fails to find the end of the function and prompts you to continue.