💾 Archived View for hajime.4teri.de › dotfiles › file › scripts › less.sh.gmi captured on 2021-12-04 at 18:04:22. Gemini links have been rewritten to link to archived content
⬅️ Previous capture (2021-12-03)
-=-=-=-=-=-=-
less.sh - dotfiles - Collection of my dotfiles
---
less.sh (229B)
---
1 #! /bin/sh
2 filename="$1"
3 num_spaces=$(((`tput cols`-`awk length > m { m = length } END { print m }` $filename`)/2))
4 spaces=""
5 if [ $num_spaces -gt 0 ]
6 then
7 spaces=`printf "%*s" $num_spaces
8 fi
9 sed "s/^/$spaces/" $filename | less
generated w/ stagit-gemini