Linux bash script:
#!/bin/bash function Print() { echo $1 } var="*" Print $var
Execution Results:
alex@alex-linux :~/tmp$ ./sample-script sample-script
* expands to a list of files, which is actually a script. How can I prevent this and see the actual value of the variable? In general, var can be more complicated than * , for example: home/alex/mydir/* .
source share