Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/pcmdPublic

Run multiple commands in parallel with clean stdout/stderr output

License

NotificationsYou must be signed in to change notification settings

fieu/pcmd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pcmd is a Go program that executes commands defined in a YAML file concurrently, with colorful output for each command.

This program was made to simplify the process of running multiple long-running commands concurrently, while still being able to distinguish between the output of each command.

Installation

Install pcmd either through the GitHub releases page or by building from source.

GitHub Releases

Download the latest release from the GitHubreleases page and extract the binary for your system.

Go Install

  1. Rungo install github.com/fieu/pcmd@latest
  2. The binary will be installed to$GOPATH/bin (e.g.~/go/bin)

Building from Source

Prerequisites

  • Go 1.16 or later
  • GNU Make
  1. Clone the repository usinggit clone https://github.com/fieu/pcmd.git
  2. Build the binary usingmake build
  3. Move the compiled binary to a directory in yourPATH (e.g./usr/local/bin)
  4. Make the binary executable usingchmod +x pcmd

Usage

To use pcmd, create a YAML file (pcmd.yml) with the following structure:

-name:System Logcommand:tail -f /var/log/system.log-name:WiFicommand:tail -f /var/log/wifi.log

Each command consists of aname and acommand field. Customize the commands as per your requirements.

Once you have the YAML file set up, run pcmd using the following command in the same directory as the YAML file:

pcmd

pcmd will read the YAML file, execute the commands concurrently, and display the output with colorful prefixes for each command.

Both stdout and stderr are displayed in the output. If a program exits, pcmd will display the exit code.

Contributing

Contributions are welcome! If you find any issues or have suggestions, please open an issue or a pull request.

License

pcmd is licensed under the MIT License. SeeLICENSE for more information.


[8]ページ先頭

©2009-2025 Movatter.jp