Should we use CODE Tags for terminal input and output?

Tags
discussions

Login to Reply

 
Thread Tools Search this Thread
# 1  
Old 07-17-2014
Should we use CODE Tags for terminal input and output?

I've always used code tags for code but not for showing terminal input and output. I noticed a mod edited one of my threads and now I'm confused as to proper protocol.

Mike
# 2  
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.
# 3  
Old 07-18-2014
It's also important because multiple spaces will get compressed in 'normal' text, but are respected within code tags.

This is an "X" with fifteen spaces, then another "X" in normal text:-
X X

This is an "X" with fifteen spaces, then another "X" in code tags:-
Code:
X               X

It's much better for clarity of indented code and for crucial fixed-width data.


Thanks for asking Smilie
Robin
# 4  
Old 07-18-2014
In addition to what has already been said, CODE tags use a fixed width font. So text like:
iiiiiiiiii
WWWWWWWWWW
which looks like very different line lengths without CODE tags, clearly show that they contain the same number of characters when that same text is displayed using CODE tags:
Code:
iiiiiiiiii
WWWWWWWWWW

And, if your code or data contains tab characters, those tabs are preserved if you copy and paste text from regions of a post that are tagged by CODE or ICODE tags, but copy as spaces when not tagged.

So, yes: always use code tags for full line sample code, input, and output; and use icode tags for partial line, imbedded sample code, input, and output!
# 5  
Old 07-18-2014
It also prevents random sequences of characters from unintentionally becoming smilies.
# 6  
Old 3 Weeks Ago
Yes you should you the code tags for terminal input and output, Recommended!
Login to Reply

|
Thread Tools Search this Thread
Search this Thread:
Advanced Search

Similar Threads More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Print Terminal Output Exactly how it Appears in the Terminal to a New Text File mrm5102 Shell Programming and Scripting 7 04-11-2016 07:44 PM
All output to terminal pager by default aydj Shell Programming and Scripting 2 12-13-2015 04:24 PM
Redirect output from terminal Devils-ey3 Shell Programming and Scripting 4 05-13-2015 05:54 AM
Performance impact of terminal output Chuck Morris UNIX for Advanced & Expert Users 1 04-05-2012 12:05 PM
12. If an 88 Record with BAI Code 902 was found on input file and not written to Output file, re sgoud UNIX for Dummies Questions & Answers 0 07-06-2011 08:30 AM
Truncate terminal output scyptnex Shell Programming and Scripting 2 01-17-2011 08:53 AM
Number of bytes in terminal input queue w/o blocking and consuming? Lucy.Garfeld Programming 4 01-30-2009 01:04 PM
how to check the user input from terminal mskart UNIX for Dummies Questions & Answers 6 11-30-2008 02:15 PM
Is my terminal input secure? pnp Security 2 08-14-2008 07:48 AM
Terminal Output to a File ?? varungupta UNIX for Advanced & Expert Users 2 01-28-2008 03:24 PM
how to redirect my output in a new terminal Sayantan Solaris 0 06-29-2007 07:01 AM
Don't show keyboard input on terminal marianor31 Shell Programming and Scripting 1 03-23-2007 07:54 PM
output to terminal andreis Programming 6 10-16-2003 05:59 AM
Output to terminal and file at the same time Charlie UNIX for Dummies Questions & Answers 1 11-15-2001 09:19 AM
How to suppress input keying from displaying on terminal. liteyear18 UNIX for Dummies Questions & Answers 2 07-19-2001 10:13 AM
All times are GMT -4. The time now is 03:16 PM.

Unix & Linux Forums Content Copyright 1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password





Not a Forum Member?
Forgot Password?