Function bash_file_from_commands

Source
pub fn bash_file_from_commands(
    c: Vec<(String, String)>,
    pnum: &String,
    wait: &String,
    suffix: &String,
) -> Vec<String>
Expand description

Apply Born-Again SHell (BASH) formatting to the Command lines in a process

  • Comments are applied with lines starting with the “#” character
  • Shebang appears as the first line
  • Fairly safe assumption for *NIX systems: /bin/bash exists in client filesystem
  • “echo” used to output to stdout
  • “read -p” used to wait for operator to proceed (if “wait”)

*This function is used for “bash” and “applescript” SCRIPT-FORMAT options