mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Updated SC2245 (markdown)
@@ -3,6 +3,8 @@
|
|||||||
### Problematic code:
|
### Problematic code:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
#!/bin/ksh
|
||||||
|
|
||||||
if [ -f ksh* ]
|
if [ -f ksh* ]
|
||||||
then
|
then
|
||||||
echo "The file exists"
|
echo "The file exists"
|
||||||
@@ -12,6 +14,8 @@ fi
|
|||||||
### Correct code:
|
### Correct code:
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
|
#!/bin/ksh
|
||||||
|
|
||||||
for f in ksh*
|
for f in ksh*
|
||||||
do
|
do
|
||||||
if [ -f "$f" ]
|
if [ -f "$f" ]
|
||||||
|
Reference in New Issue
Block a user