GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
PORCHGEN(1) FreeBSD General Commands Manual PORCHGEN(1)

porchgenporch script generator

porchgen -f scriptfile command [argument ..]

The porchgen utility generates an orch(5) sxript based on user interaction with the spawned command.

The following options are available for porchgen:

scriptfile
Names the scriptfile to create.
Show a usage statement.

porchgen operates by first spawning the requested command, then polling for both output from the command and input from the user. A () statement is written to the scriptfile to match the command passed in. Output from the command is sent immediately to the user as it comes in, and internally recorded. When a line comes in from the user, porchgen records a () block from the last line of output recorded, and adds up to two previous lines of output in commented out match() blocks for context that might have been necessary. A () statement is then issued for the line received before it is passed along to the command.

Execution continues and blocks are emitted until either stdout of the command or stdin of porchgen reach EOF.

The porchgen utility exits 0 on success, and >0 if an error occurs. EOF on the command stdout is considered an error if the process was signalled or exited with a non-zero exit code. EOF on stdin is currently always considered an error.

expect(1), porch(1), pts(4), orch(5)

porchgen was written by Kyle Evans <kevans@FreeBSD.org>.

December 21, 2024 FreeBSD 14.3-RELEASE

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.