2019-04-24 16:16:37 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# This is a quick and dirty shell script to extract the words
|
|
|
|
# in a source file and return the descriptions of them.
|
|
|
|
#
|
|
|
|
# Requirements:
|
|
|
|
#
|
|
|
|
# In your $PATH:
|
|
|
|
#
|
|
|
|
# - retro
|
|
|
|
# - retro-describe
|
2020-10-15 20:44:14 +02:00
|
|
|
# - retro-unu
|
2019-04-24 16:16:37 +02:00
|
|
|
#
|
|
|
|
# Usage:
|
|
|
|
#
|
|
|
|
# ./describe sourcefile
|
|
|
|
|
2020-10-15 20:44:14 +02:00
|
|
|
retro-unu $1 | tr " " "\n" | sed '/^[[:space:]]*$/d' | grep -Ev "^[\\\^\.\"\@\!\$\`:&'#$.\(\|]" | sort | uniq | tr "\n" "\0" | xargs -0 retro-describe | cat -s
|
|
|
|
retro-unu $1 | tr " " "\n" | sed '/^[[:space:]]*$/d' | cut -c1-1 | sort | uniq | grep "[\\\^\.\"\@\!\$\`:&'#$.\(\|]" | sed 's/^/prefix:/' | tr "\n" "\0" | xargs -0 retro-describe | cat -s
|