bashparser

command
v0.16.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2025 License: UPL-1.0 Imports: 5 Imported by: 0

README

Bash Parser

This go module parses bash scripts using the sh library.

Run the bash parser directly

To run the parser, from the root dir of this repository:

go run ./golang/cmd/bashparser/bashparser.go -h
  • -file <bash_file_path>: The path of the bash script file.
  • -input <string>: The bash script content to be parsed. Input is prioritized over file option.
  • -output <output_json_file>: The path to the output json file.

If the bash file is valid, the output JSON string is put to stdout and the application return a zero code. When there are errors, the error messages are put to stderr and the module will exit with non-zero code.

When there are errors while storing the JSON content to a file, the JSON string is still put to stdout, but those errors will be put to stderr.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL