Skip to content
Advertisement

Tag: scripting

Prevent * to be expanded in the bash script

Linux bash script: Execution results: * is expanded to the list of files, which is actually script itself. How can I prevent this and see actual variable value? In general case, var can be more complicated than *, for example: home/alex/mydir/*. Answer you need to escape your variables, too: And in your function:

Advertisement