Write a command-line tool topsort that reads a dependency specification from STDIN and outputs a topological…
Write a command-line tool topsort that reads a dependency specification from STDIN and outputs a topological…: a task in termgrade-bandcentral-gemma4-31b-bash: TermGrade Band-Central: the 151-task selection and its splits (Harbor dataset). Input format (read from STDIN): - Each line is either…
The task
**Input format (read from STDIN):** - Each line is either blank (ignore), a comment starting with `#` (ignore everything on that line after `#`), or a dependency declaration. - A dependency declaration has the form: `NODE: DEP1 DEP2 ... DEPn` - `NODE` is a non-empty string that does not contain `:`, `#`, or…