sh: getting <category>/<portname> from pwd
- Reply: Robert Clausecker : "Re: sh: getting <category>/<portname> from pwd"
- Reply: Pau Amma : "Re: sh: getting <category>/<portname> from pwd"
- Reply: Tatsuki Makino : "Re: sh: getting <category>/<portname> from pwd"
- Reply: Eugene Grosbein : "Re: sh: getting <category>/<portname> from pwd"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 25 Oct 2022 22:14:42 UTC
Hello all, I'm writing a shell script to feed poudriere testports and I need to get <category>/<portname> from ports tree: `pwd`: /home/user/work/freebsd/ports/<category>/<portname> `pwd | rev | cut -d / -f1,2 | rev` do the trick but it is so uggly! Is there a shell option to get it? Thanks, -- Nuno Teixeira FreeBSD Committer (ports)