33118ff158
FossilOrigin-Name: b7c7e29a709ec6621782b64302f3e8a92f806bf9f8f73b69e8d2bdf54ef8c0d0
19 lines
602 B
Bash
Executable file
19 lines
602 B
Bash
Executable file
#!/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
|
|
# - retro-unu
|
|
#
|
|
# Usage:
|
|
#
|
|
# ./describe sourcefile
|
|
|
|
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
|