Bash (Unix shell): Difference between revisions
(→Usage) |
|||
Line 60: | Line 60: | ||
* <code>"${DRIVES[@]}"</code> means every element will be a new word | * <code>"${DRIVES[@]}"</code> means every element will be a new word | ||
* <code>"${DRIVES[*]}"</code> will expand the array into a single word | * <code>"${DRIVES[*]}"</code> will expand the array into a single word | ||
===Functions=== | |||
<syntaxhighlight lang="bash"> | |||
#!/bin/bash | |||
function say_hello { | |||
echo Hello $1 | |||
} | |||
say_hello World | |||
</syntaxhighlight> | |||
==dirname== | ==dirname== |