@@ -581,7 +581,7 @@ check_pipeline_elements() {
581581 # Trim any leading whitespace left by the previous step
582582 pipeline=${pipeline# " ${pipeline%% [![:space:]]* } " }
583583 # Drop leading option tokens (e.g. "-e", "-v", "--no-fault")
584- while [[ $ pipeline == - * ] ]; do
584+ while [ " ${ pipeline# -} " != " $pipeline " ]; do
585585 # Remove the first token (option) and any following whitespace
586586 pipeline=${pipeline#* }
587587 pipeline=${pipeline# " ${pipeline%% [![:space:]]* } " }
@@ -601,7 +601,7 @@ check_pipeline_elements() {
601601 # ---- NEW ----
602602 # Strip surrounding whitespace; skip blank lines
603603 element_spec=$( printf ' %s' " $element_spec " | xargs)
604- [[ -z $element_spec ] ] && continue
604+ [ -z " $element_spec " ] && continue
605605 # --------------
606606
607607 element_name=$( printf ' %s' " $element_spec " | cut -d' ' -f1)
@@ -704,7 +704,7 @@ check_file_size() {
704704
705705 # ---- Ensure we have `stat` ------------------------------------------------
706706 if ! command -v stat > /dev/null 2>&1 ; then
707- log_fail " ` stat` command not found – cannot determine file size"
707+ log_fail " stat command not found – cannot determine file size"
708708 return 1
709709 fi
710710
@@ -715,7 +715,7 @@ check_file_size() {
715715 }
716716
717717 # ---- Compare with the expected size --------------------------------------
718- if (( size_in_bytes >= expected_file_size )) ; then
718+ if [ " $ size_in_bytes" -ge " $ expected_file_size" ] ; then
719719 log_pass " File OK (size ${size_in_bytes} bytes ≥ ${expected_file_size} bytes): $input_file_path "
720720 return 0
721721 else
0 commit comments