Setting up an alias for 'pkg info | awk'
zep
zgreenfelder at gmail.com
Sat Jan 17 13:18:13 UTC 2015
> Hi,
>
> I am trying to list out all the ports on my system with a Bash shell
> alias :
>
> alias pia="pkg info | awk '{print $1}'"
>
> But this alias simply prints the output of 'pkg info'.
>
> Is there some way to do this ?
>
it doesn't make any sense to me why the alias wouldn't be working, but
another option would be to create /root/bin/pia, set the execute bit and
have the contents set to:
#!/bin/sh
pkg info | awk '{print $1}'
then modify root's path to include ~/bin
--
public gpg key id: AE60F64C
More information about the freebsd-questions
mailing list