Bash - Glob files

files=(*.txt); echo "${files[@]}" # output: a.txt b.txt files=(*.txt); echo ${#files[@]} # output: 2 files=(*.txt); echo "${files[0]}" # output: a.txt files=(*.txt); echo "${files[1]}" # output: b.txt

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.