password-store

Simple password manager using gpg and ordinary unix directories
git clone https://git.zx2c4.com/password-store
Log | Files | Refs | README | LICENSE

example-filter.sh (405B)


      1 #!/bin/sh
      2 
      3 # This is a super bootleg script for converting plaintext examples into groff.
      4 
      5 while read line; do
      6 	echo "$line" | while read -n 1 char; do
      7 		if [[ $char == "%" ]]; then
      8 			echo -n '%'
      9 			continue
     10 		fi
     11 		ord=$(printf '%d' "'$char")
     12 		if [[ $ord -eq 0 ]]; then
     13 			printf ' '
     14 		elif [[ $ord -gt 127 ]]; then
     15 			printf '\[u%X]' "'$char"
     16 		else
     17 			printf "$char"
     18 		fi
     19 	done
     20 	echo
     21 	echo ".br"
     22 done