Sponsored Content
Top Forums Shell Programming and Scripting Grep: a better way to temporarily disable colors? Post 302968354 by Don Cragun on Tuesday 8th of March 2016 03:45:22 PM
Old 03-08-2016
Quote:
Originally Posted by MadeInGermany
Looks like a bug in grep.
It should never add terminal color sequences if output is directed to a file or to a pipe.
Not even when the option-argument is always (as in --color=always)? I don't have a GNU grep to test but I haven't seen where the GNU man page states any exceptions to always in the above case. (Maybe the "on the terminal" in that section of the description means that --color is ignored when output isn't directed to a terminal device, but it doesn't clearly state that behavior.)
 

8 More Discussions You Might Find Interesting

1. HP-UX

Temporarily Disable User Account

I want to temporarily disable a user account on HP-UX at the start of a script and renable the account at the end of the script. What would be the best method on HP-UX to temporarily disable a user account? I know of the passwd -l option that will lock the account, but I do not see a flag for... (4 Replies)
Discussion started by: scotbuff
4 Replies

2. AIX

how to block a user temporarily?

hi to all i'm a newbie on aix. how would i block temporarily a few users in accessing our aix server so that other users may not be affected by th cpu usage...because if all of them accessing our server the CPU utilization goes high... thanks winky (3 Replies)
Discussion started by: winky
3 Replies

3. Shell Programming and Scripting

Can is set permissions temporarily?

I want to do just what the title says. Here's why: I am adapting a script that backups to a mount. In the script it has a catch where if the drive isn't RW then it unmounts and attempts to remount RW. # attempt to remount the RW mount point as RW; else abort $MOUNT -o remount,rw... (3 Replies)
Discussion started by: Movomito
3 Replies

4. UNIX for Dummies Questions & Answers

Temporarily change the date / time

Hi - I'd like to know if it's possible to change the time on a Unix box temporarily, do some stuff, and then set it back to the correct time. I'm testing some code that reads a time (in hours) from a config file, and does something at that time. I want to be able to run regression test... (5 Replies)
Discussion started by: samgdavies
5 Replies

5. Shell Programming and Scripting

temporarily suspend crontab

Issues: Cron jobs are running everyday at 8PM to hot backup database, archivelog, and some other files. Sometimes crontab scheduled backups need to be suspended for some other tasks randomly but doesn't happen all the time. Objective: I need to create simple script or command ( example :... (7 Replies)
Discussion started by: Paul.S
7 Replies

6. Shell Programming and Scripting

How to disable Enable/Disable Tab Key

Hi All, I have bash script, so what is sintax script in bash for Enable and Disable Tab Key. Thanks for your help.:( Thanks, Rico (1 Reply)
Discussion started by: carnegiex
1 Replies

7. Solaris

Increase /tmp size temporarily

Hi all system Solaris 10 10/09 s10x_u8wos_08a X86 ufs file system I would like to install SunStudio. After the gui comes up it shows that i need to add swap space of at least 900m. the command swap-s shows 880m free. My question is can you temporarily increase swap by 1 or 2... (3 Replies)
Discussion started by: kc2dws
3 Replies

8. Red Hat

SSL/TLS renegotiation DoS -how to disable? Is it advisable to disable?

Hi all Expertise, I have following issue to solve, SSL / TLS Renegotiation DoS (low) 222.225.12.13 Ease of Exploitation Moderate Port 443/tcp Family Miscellaneous Following is the problem description:------------------ Description The remote service encrypts traffic using TLS / SSL and... (2 Replies)
Discussion started by: manalisharmabe
2 Replies
set_color(1)							       fish							      set_color(1)

NAME
set_color - set_color - set the terminal color set_color - set the terminal color Synopsis set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR] Description Change the foreground and/or background color of the terminal. COLOR is one of black, red, green, brown, yellow, blue, magenta, purple, cyan, white and normal. o -b, --background Set the background color o -c, --print-colors Prints a list of all valid color names o -h, --help Display help message and exit o -o, --bold Set bold or extra bright mode o -u, --underline Set underlined mode o -v, --version Display version and exit Calling set_color normal will set the terminal color to whatever is the default color of the terminal. Some terminals use the --bold escape sequence to switch to a brighter color set. On such terminals, set_color white will result in a grey font color, while set_color --bold white will result in a white font color. Not all terminal emulators support all these features. This is not a bug in set_color but a missing feature in the terminal emulator. set_color uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and incomplete terminfo databases, and may lack color information for terminals that support it. Download and install the latest version of ncurses and recompile fish against it in order to fix this issue. Version 1.23.1 Sun Jan 8 2012 set_color(1)
All times are GMT -4. The time now is 08:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy