Skip to content

Commit b8d85e3

Browse files
committed
egrep: warning: egrep is obsolescent; using grep -E
1 parent 1362a94 commit b8d85e3

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

413_ran_reference_config.txt

100644100755
File mode changed.

ff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if [[ -z "$SEARCH_TERM" ]]; then
1313
echo "Oop! Enter a search term..."
1414
else
1515
echo ""
16-
RETURNS=$(egrep -rwl ${PWD} --include=\*.adoc --exclude-dir={drupal-build,_preview} -e "$SEARCH_TERM")
16+
RETURNS=$(grep -E -rwl ${PWD} --include=\*.adoc --exclude-dir={drupal-build,_preview} -e "$SEARCH_TERM")
1717
for ITEM in $RETURNS
1818
do printf ''${blue}'\e]8;;file:///'$ITEM'\e\\'$ITEM'\e]8;;\e\\\n'${blue}''
1919
done

find-used-ref-yaml.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
#
3+
# Checks to see which YAML files listed in a text file are not referenced in AsciiDoc source files.
4+
5+
# Pass a text file containing the YAML filenames (one per line)
6+
FILES="$1"
7+
8+
OCPDOCS_DIR="/home/aireilly/openshift-docs"
9+
10+
# Read $FILES, search for $FILENAME in AsciiDoc, if not found, report the missing file
11+
while IFS= read -r FILENAME; do
12+
find "$OCPDOCS_DIR" -type f -name "*.adoc" -exec grep -qF "$FILENAME" {} \; || echo "$FILENAME is not used."
13+
done < "$FILES"

0 commit comments

Comments
 (0)