HOWTO run pshell commands from a script - binbash23/p GitHub Wiki

If you want to run p from a script and you have to push pshell commands into p, you can do it like this:

./p -p <YOUR_PASSWORD> -Q "PSHELL_COMMAND(S)"

For example start p and list all account and exit afterwards where the p master password is "secret_password":

./p -p "secret_password" -Q "list;quit"