Bash is a weakly typed language because it does not require declaring data type at the time of variable declaration. Bash variables are treated as strings, and the type of variable is set based on the current value. Bash variables can be defined by using declare command. However, to define data types, options are limited and do not support all data types. For example: declare command cannot be used for the float data type.
Posted Date:- 2021-09-10 01:31:35
In my bash shell I want my prompt to be of format ‘$”Present working directory”:”hostname”> and load a file containing a list of user-defined functions as soon as I log in, how will you automate this?