dtree

Програм из командне линије за исцртавање стабала
git clone https://git.sr.ht/~strahinja/dtree
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

tree_readme.sh (465B)


      1 #!/bin/sh
      2 # Requires:
      3 # - table
      4 #	https://git.sr.ht/~strahinja/table/
      5 # - working paste or pmpaste if using Busybox
      6 #	https://git.sr.ht/~strahinja/dotfiles/tree/master/item/bin/pmpaste
      7 case "$(file "$(which paste 2>/dev/null)" 2>/dev/null)" in
      8 	*busybox*)	paste="pmpaste";;
      9 	*)		paste="paste";;
     10 esac
     11 dtree test/test-001.txt |
     12 while IFS= read -r line; do
     13 	printf "%s%*s\n" "$line" $((40-${#line})) " "
     14 done |
     15 "$paste" - README |
     16 tsvtable -n -f1:5 -c123 -t |
     17 less -S