There are no manual pages for these and not thinking along I passed $PWD once; let's say "pkgpath" here as is common.
While here, drop useless use of cat(1) and quote user input. OK? Index: Makefile =================================================================== RCS file: /cvs/ports/databases/sqlports/Makefile,v retrieving revision 1.119 diff -u -p -r1.119 Makefile --- Makefile 20 Jul 2019 23:12:47 -0000 1.119 +++ Makefile 3 Oct 2019 11:36:33 -0000 @@ -1,7 +1,7 @@ # $OpenBSD: Makefile,v 1.119 2019/07/20 23:12:47 espie Exp $ CATEGORIES = databases -V = 7.25 +V = 7.26 DISTNAME = sqlports-$V DISTFILES = COMMENT = sqlite database of ports Index: files/scripts/show-reverse-deps =================================================================== RCS file: /cvs/ports/databases/sqlports/files/scripts/show-reverse-deps,v retrieving revision 1.6 diff -u -p -r1.6 show-reverse-deps --- files/scripts/show-reverse-deps 4 Jun 2019 16:05:52 -0000 1.6 +++ files/scripts/show-reverse-deps 3 Oct 2019 11:36:02 -0000 @@ -24,7 +24,7 @@ set -e if [ $# -eq 0 ] then - echo 2>&1 "Usage: show-reverse-deps path [sqlite_db]" + echo 2>&1 "Usage: show-reverse-deps pkgpath [sqlite_db]" exit 1 fi if [ $# -ge 2 ] @@ -33,7 +33,7 @@ then else file=${TRUEPREFIX}/share/sqlports fi -cat <<EOSQL |sqlite3 $file +sqlite3 "$file" <<EOSQL with recursive d (fullpkgpath, dependspath) as (select root.fullpkgpath, root.dependspath from _canonical_depends root