https://github.com/mle86/clerr
Colorize stderr for one command
https://github.com/mle86/clerr
colorization command-line-tool error-output linux stderr stdout
Last synced: 7 months ago
JSON representation
Colorize stderr for one command
- Host: GitHub
- URL: https://github.com/mle86/clerr
- Owner: mle86
- License: gpl-3.0
- Created: 2016-05-13T01:29:49.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-03T20:02:37.000Z (over 8 years ago)
- Last Synced: 2025-01-14T15:23:29.879Z (9 months ago)
- Topics: colorization, command-line-tool, error-output, linux, stderr, stdout
- Language: C
- Size: 41 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG
- License: COPYING
Awesome Lists containing this project
README
[//]: # (This file was autogenerated from the man page with 'make README.md')
# clerr(1) - colorize error output
Version 1.0.5, July 2017
clerr [-1hV] [-c COLOR] COMMAND [ARGUMENTS...]
# Description
**clerr** is a command line tool which executes another *COMMAND* and colorizes all error output (on stderr) of that program while its normal output (on stdout) will be printed in the default colors.
# Installation
```
$ make
# make install
```This will compile the binary and copy it to /usr/local/bin/**clerr**.
The man page will be copied to /usr/local/share/man/man.1/**clerr.1.gz**.# Options
* **-1**
All output will be printed on stdout only, even error output (which will still get colorized).
* **-c COLOR**
Sets the color for error output.
Default is *red*.
Valid colors and their valid abbreviations are:
*red*/*re*/*rd*,
*green*/*gr*/*gn*,
*blue*/*bl*,
*yellow*/*ye*/*yw*,
*cyan*/*cy*/*cn*,
*white*/*wh*.
* **-h**
Prints a short help summary and exits.
* **-V**
Prints the program version and exits.# Exit Status
**clerr** will exit with the same status as *COMMAND*,
if it was executed successfully.
If the command was terminated due to a signal,
**clerr** will kill itself with the same signal.
Otherwise, **clerr** will return one of these special exit status values:* **1**
invocation error
(e.g. syntax error or unknown option)
* **124**
*COMMAND* could not be executed
* **125**
internal error
(e.g. could not fork)# Examples
* **clerr cat /etc/group-**
This will display the file */etc/group-* in standard colors.
If the file does not exist or the caller is not permitted to read this file, the corresponding error message (something like "cat: /etc/group-: No such file or directory") will be printed in red.
* **clerr make**
Run **make** in the current directory. Any compiling errors will be printed in red.# License
[GNU GPL v3](http://gnu.org/licenses/gpl.html)
# Author
Maximilian Eul <[maximilian@eul.cc](mailto:maximilian@eul.cc)>