Helix Core is now P4. Product user interfaces will be updated soon. Learn more >>

P4 CLI Documentation | 2025.2

# Scripting with P4 Server forms

If your scripts issue `p4` commands that require the user to fill in a form, such as the `p4 client` and `p4 submit` commands, use the `-o` option to write the form to standard output and the `-i` option to read the edited form from standard input.

For example, to create a job using a script on UNIX:

1. Write a blank job specification into a text file.

       p4 job -o > temp1

2. Make the necessary changes to the job.

   For example:

       sed 's/<enter description here>/Crashes on exit./' temp1 > temp2

3. Save the job.

       p4 job -i < temp2

To accomplish the preceding without a temporary file, issue the following command:

    p4 job -o | sed 's/<enter description here>/Crashes on exit./' | p4 job -i

Common commands that display forms:

- `p4 branch`
- `p4 change`
- `p4 client`
- `p4 job`
- `p4 label`
- p4 submit
- `p4 stream`

Your search for returned results