mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
The suggestion to use ls /directory/*mystring*
is wrong. If /directory/mystring
is a directory, its contents would be printed.
@@ -14,12 +14,6 @@ rm $(ls | grep -v '\.c$')
|
|||||||
|
|
||||||
### Correct code:
|
### Correct code:
|
||||||
|
|
||||||
```sh
|
|
||||||
ls /directory/*mystring*
|
|
||||||
```
|
|
||||||
|
|
||||||
or
|
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
# BASH
|
# BASH
|
||||||
shopt -s extglob
|
shopt -s extglob
|
||||||
|
Reference in New Issue
Block a user