# Portmaster: why this?



## piggy (Jan 19, 2012)

```
<root@freebsd8bx>/root # portmaster -D -PP 'cat /root/installed-port-list'      
===>>> /var/db/pkg/cat does not exist
===>>> Aborting update

Terminated
```
Is this a portmaster bug?


----------



## wblock@ (Jan 19, 2012)

That's a variation of step 10 of the reinstallation procedure at the end of the portmaster man page.  Look very closely at that line; those aren't single ticks.


----------



## numpad5 (Jan 19, 2012)

Those look like single quotes around cat instead of backticks. (on the tilde key) with single quotes it will just try to *portupgrade* "cat" instead of inserting the output of *cat /root/installed-port-list* if I am not mistaken.


----------



## piggy (Jan 19, 2012)

numpad5 said:
			
		

> Those look like single quotes around cat instead of backticks. (on the tilde key) with single quotes it will just try to portupgrade "cat" instead of inserting the output of "cat /root/installed-port-list" if I am not mistaken.


You guys are right. So, so, sensible command line. It should accept also single quotes not just backticks. Duh to me yes (and the programmer too).


----------



## wblock@ (Jan 19, 2012)

No, backticks have a different meaning than single quotes.  Both are interpreted by the shell before portmaster ever sees them.  Backticks mean "execute this and return the result", while single quotes are just "take what's given verbatim".


----------



## phoenix (Jan 19, 2012)

For sh-based shells (don't know about csh-based shells), it's so much nicer to use the *$( )* syntax instead of backticks.  For just this reason.  Yeah, yeah, backticks are the historical way of doing things, and people don't like change, and $() may not be universal, but it's just so much nicer to use, read, etc.  

`$ portmaster -D -PP $(cat /root/installed-port-list)`


----------

