srodowisko_programisty/lab1/4.bash

7 lines
126 B
Bash
Executable file

#!/usr/bin/env bash
for word in $(grep -Roh '\w*' "$1" | sort | uniq)
do
echo "$word:"
grep -Rwn "$word" "$1"
done