Skip to main content

parse_bash_script

Function parse_bash_script 

Source
pub fn parse_bash_script(content: &str) -> Vec<String>
Expand description

Parse a bash script file, extracting executable command lines.

Skips:

  • Lines starting with # (comments, shebangs)
  • Blank/whitespace-only lines

Each remaining line is trimmed and returned as one command.