Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

my-trash-bin/shell-topological-sort

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Shell topological sort

POSIX-compliant topological sort using shell script

Usage

Prepare your input file, and redirect it into its stdin.

sh main.sh < input.properties

Input file format

Just as like .properties file.

Each line is in form KEY=VALUE where VALUE is space-separated dependencies of KEY

Example below

minirt.exe=-lminirt -lminirt_args
-lminirt=-lcommon -lm
-lcommon=-lc
-lminirt_args=-lcommon

output:

-lc
-lcommon
-lm
-lminirt
-lminirt_args
minirt.exe

Restrictions

  • No detection for dependency cycle.
  • Line break and equal sign and spaces are not supported due to file format.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages