diff --git a/SC2245.md b/SC2245.md index 0f12cff..39919fc 100644 --- a/SC2245.md +++ b/SC2245.md @@ -3,6 +3,8 @@ ### Problematic code: ```sh +#!/bin/ksh + if [ -f ksh* ] then echo "The file exists" @@ -12,6 +14,8 @@ fi ### Correct code: ```sh +#!/bin/ksh + for f in ksh* do if [ -f "$f" ]