#!/bin/env bash # usage get_net_length.bash merged.lef design.def wire_length.txt set -u { openroad -exit -no_splash < $(dirname $3)/get_net_length-openroad.log filename=$(basename $3) filename_no_ext="${filename%%.*}" sort_file_path="$(dirname $3)/${filename_no_ext}-sorted.txt" cat $3 | sort -k 2 -n | column -t > $sort_file_path echo "wrote to $sort_file_path"