Sponsored Content
The Lounge What is on Your Mind? Should we use CODE Tags for terminal input and output? Post 302909605 by Corona688 on Thursday 17th of July 2014 07:02:19 PM
Old 07-17-2014
Yes, use them for terminal input and output as well.

It's better than setting random colors and fonts, or labelling them with
----------------output starts here-------------------------
...or letting people guess where it begins and ends.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to suppress input keying from displaying on terminal.

I'm a Unix newbie. In a shell-script, is there any way to accept keyboard input (via STDIN) without having it display on the screen? I know keying in a login password sort of does this by replacing what you key with astericks (*) but I believe that's a "C" routine. I'd like to be able to... (2 Replies)
Discussion started by: liteyear18
2 Replies

2. Programming

output to terminal

How can I write to another user's pseudo tty, but not to its current prompt position (as in open("/dev/pts007", ...) followed by write() ). Instead I would like to write to the top center of the screen using color red, for example. Like curses, but from another console. (6 Replies)
Discussion started by: andreis
6 Replies

3. Shell Programming and Scripting

Don't show keyboard input on terminal

I am developing a script that will run with '/bin/ksh' shell. The script is intended to receive a password by keyboard input, but for security reasons I would like to hide what the user is typing. The keyboard input is being caught by 'read' command. exmaple : echo "Please type your new... (1 Reply)
Discussion started by: marianor31
1 Replies

4. Solaris

how to redirect my output in a new terminal

Hi all, i type a command along with dtterm what i would like to have is that the output of the command to be shown in the new terminal . Any Idea on how to acheive this? (0 Replies)
Discussion started by: Sayantan
0 Replies

5. UNIX for Advanced & Expert Users

Terminal Output to a File ??

Hey, How can I transfer the terminal output to a file ? For example : command "fuser" returns the "process-id" and prints the output on the terminal, but I want that output to a file as well. How can I do that ? /clocal/mqbrkrs/user/mqsiadm/sanjay/AccessMonitor $ fuser -uf... (2 Replies)
Discussion started by: varungupta
2 Replies

6. Cybersecurity

Is my terminal input secure?

My knowledge of Unix input/output/devices is very hazy so could someone please tell me if the following is secure? I log on to an account on a shared Unix server (Linux 2.6.18-6-686) using ssh (PuTTY). I start a python program and then type into it (python raw_input command) the... (2 Replies)
Discussion started by: pnp
2 Replies

7. UNIX for Dummies Questions & Answers

how to check the user input from terminal

Hello everybody!!! I am writing my own rm command in unix. I prompt the user to type if he wants to delete a file and then read what he typed. But how do i check what he typed? This is my program so far: echo 'Delete prog1.c (y/n)?' read yesOrNo if yesOrNo == 'y' then rm prog1.c... (6 Replies)
Discussion started by: mskart
6 Replies

8. Programming

Number of bytes in terminal input queue w/o blocking and consuming?

Hello, everyone. Could someone, please, tell me how to get the number of bytes in the terminal input queue without blocking and without consuming these bytes? I guess it could be called the peek functionality. I've looked at termio tcgetattr() and tcsetattr() functions but could not find... (4 Replies)
Discussion started by: Lucy.Garfeld
4 Replies

9. UNIX for Dummies Questions & Answers

12. If an ‘88’ Record with BAI Code ‘902’ was found on input file and not written to Output file, re

This is my input file like this 03,105581,,015,+00000416418,,,901,+00000000148,,,922,+00000000354,,/ 49,+00000000000416920,00002/ 03,5313236,,015,+00231036992,,,045,+00231036992,,,901,+00000048428,,/ 88,100,+0000000000000,0000000,,400,+0000000000000,0000000,/ 88,902,+0000000079077,,/... (0 Replies)
Discussion started by: sgoud
0 Replies

10. Shell Programming and Scripting

Print Terminal Output Exactly how it Appears in the Terminal to a New Text File

Hello All, I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly. Is there any way to take the output from the cat... (7 Replies)
Discussion started by: mrm5102
7 Replies
TERMINAL_COLORS.D(5)						 terminal-colors.d					      TERMINAL_COLORS.D(5)

NAME
terminal-colors.d - Configure output colorization for various utilities SYNOPSIS
/etc/terminal-colors.d/[[name][@term].][type] DESCRIPTION
Files in this directory determine the default behavior for utilities when coloring output. The name is a utility name. The name is optional and when none is specified then the file is used for all unspecified utilities. The term is a terminal identifier (the TERM environment variable). The terminal identifier is optional and when none is specified then the file is used for all unspecified terminals. The type is a file type. Supported file types are: disable Turns off output colorization for all compatible utilities. enable Turns on output colorization; any matching disable files are ignored. scheme Specifies colors used for output. The file format may be specific to the utility, the default format is described below. If there are more files that match for a utility, then the file with the more specific filename wins. For example, the filename "@xterm.scheme" has less priority than "dmesg@xterm.scheme". The lowest priority are those files without a utility name and terminal iden- tifier (e.g. "disable"). The user-specific $XDG_CONFIG_HOME/terminal-colors.d or $HOME/.config/terminal-colors.d overrides the global setting. EXAMPLES
Disable colors for all compatible utilities: touch /etc/terminal-colors.d/disable Disable colors for all compatible utils on a vt100 terminal: touch /etc/terminal-colors.d/@vt100.disable Disable colors for all compatible utils except dmesg(1): touch /etc/terminal-colors.d/disable touch /etc/terminal-colors.d/dmesg.enable DEFAULT SCHEME FILES FORMAT
The following statement is recognized: name color-sequence The name is a logical name of color sequence (for example "error"). The names are specific to the utilities. For more details always see the COLORS section in the man page for the utility. The color-sequence is a color name, ASCII color sequences or escape sequences. Color names black, blink, blue, bold, brown, cyan, darkgray, gray, green, halfbright, lightblue, lightcyan, lightgray, lightgreen, lightmagenta, lightred, magenta, red, reset, reverse, and yellow. ANSI color sequences The color sequences are composed of sequences of numbers separated by semicolons. The most common codes are: 0 to restore default color 1 for brighter colors 4 for underlined text 5 for flashing text 30 for black foreground 31 for red foreground 32 for green foreground 33 for yellow (or brown) foreground 34 for blue foreground 35 for purple foreground 36 for cyan foreground 37 for white (or gray) foreground 40 for black background 41 for red background 42 for green background 43 for yellow (or brown) background 44 for blue background 45 for purple background 46 for cyan background 47 for white (or gray) background Escape sequences To specify control or blank characters in the color sequences, C-style -escaped notation can be used: a Bell (ASCII 7)  Backspace (ASCII 8) e Escape (ASCII 27) f Form feed (ASCII 12) Newline (ASCII 10) Carriage Return (ASCII 13) Tab (ASCII 9) v Vertical Tab (ASCII 11) ? Delete (ASCII 127) \_ Space \ Backslash () ^ Caret (^) # Hash mark (#) Please note that escapes are necessary to enter a space, backslash, caret, or any control character anywhere in the string, as well as a hash mark as the first character. For example, to use a red background for alert messages in the output of dmesg(1), use: echo 'alert 37;41' >> /etc/terminal-colors.d/dmesg.scheme Comments Lines where the first non-blank character is a # (hash) are ignored. Any other use of the hash character is not interpreted as introducing a comment. FILES
$XDG_CONFIG_HOME/terminal-colors.d $HOME/.config/terminal-colors.d /etc/terminal-colors.d ENVIRONMENT
TERMINAL_COLORS_DEBUG=all enables debug output. COMPATIBILITY
The terminal-colors.d functionality is currently supported by all util-linux utilities which provides colorized output. For more details always see the COLORS section in the man page for the utility. AVAILABILITY
terminal-colors.d is part of the util-linux package and is available from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils /util-linux/>. util-linux January 2014 TERMINAL_COLORS.D(5)
All times are GMT -4. The time now is 05:50 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy