Sponsored Content
Full Discussion: Quick VI question
Top Forums UNIX for Advanced & Expert Users Quick VI question Post 11133 by Perderabo on Thursday 29th of November 2001 10:36:23 AM
Old 11-29-2001
Quote:
Originally posted by wizard
In command mode, go to the command prompt (the :) and type
set list

This should show non-printable characters in vi.
Actually, with most versions of unix, ":set list" only affects white space. It causes tabs to show up as ^I and newlines to be marked with $.

The real problem is that some bytes could have values in the range of 128 to 255 and you may not have an 8 bit data path to your terminal. Depending on the stty settings, the MSB may be a parity bit rather than a data bit. Also not all terminals will display something for non-ascii characters. And a final problem is that, I think, vi balks at attempting to display nulls, although it will count them and display a count at startup time.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Quick Question

I know in DOS, when you want to pull up your last/previous command, you hit the up/down arrows. How do you do that with UNIX? (3 Replies)
Discussion started by: Tracy Hunt
3 Replies

2. Shell Programming and Scripting

A very quick question

Just a super quick question: how do you put a link in your php code. I want to make a link to something in /tmp directory. i.e. how do you put a href into php, I think it's done a bit differently. thanks john (1 Reply)
Discussion started by: jmg5
1 Replies

3. UNIX for Dummies Questions & Answers

Quick Question

Hello There! I am trying to write this SIMPLE script in Bourne Shell but I keep on getting syntax errors. Can you see what I am doing wrong? I've done this before but I don't see the difference. I am simply trying to take the day of the week from our system and when the teachers sign on I want... (7 Replies)
Discussion started by: catbad
7 Replies

4. UNIX for Dummies Questions & Answers

Another quick question

Hi guys sed -e "s/$<//g" the $< can allow me to assign an input value to the variable right? do the double quotes check the previous context? (1 Reply)
Discussion started by: hamoudzz
1 Replies

5. Shell Programming and Scripting

quick question

does anyone know what $? means? i echoed it on my box (running AIX Korn shell) and got 127 (2 Replies)
Discussion started by: penfold
2 Replies

6. UNIX for Dummies Questions & Answers

Quick Question

Hi, I am new to UNIX, and am learning from this tutorial : http://www.ee.surrey.ac.uk/Teaching/Unix/index.html It keeps telling me to files downloaded from the internet (like .txt files) to the directory, and I dont know how to. How do I add .txt files to my directory? Thanks. (6 Replies)
Discussion started by: IAMTHEEVILBEAN
6 Replies

7. UNIX for Dummies Questions & Answers

quick question

from command prompt I did grep two words on a same line for eg: grep abc | grep xyz and I got tht particular line, but I want to know when I vi that file how to directly search for that particular line? I appreciate if any one can provide answer, thanks in advance (2 Replies)
Discussion started by: pkolishetty
2 Replies

8. UNIX for Dummies Questions & Answers

Quick question

Hello all, Quick question from a fairly new to Unix developer. if then completedLogFile=$logfile.$(date +%Y%m%d-%H:%M:%S) mv $logfile $completedLogFile fi I understand that this portion of code is simply copying a tmp logfile to a completed logfile when a condition is true. The... (2 Replies)
Discussion started by: JohnnyBoy
2 Replies

9. UNIX for Dummies Questions & Answers

Quick question.

I'd like to list all userid's on the system that have a .bashrc file in their home directory with a command like "cat /etc/passwd | grep -f", however I'm not quite familiar with using grep. Any suggestions? (2 Replies)
Discussion started by: raidkridley
2 Replies

10. Shell Programming and Scripting

Quick question

When I have a file like this: 0084AF aj-123-a NAME Ajay NAME Kumar Engineer 015ED6 ck-345-c 020B25 ef-456-e 027458 pq-890-p NAME Peter NAME Salob Doctor 0318F0 xy-123-x NAME Xavier Arul NAME Yesu Supervisor 0344CA de-456-d where - The first NAME is followed by... (6 Replies)
Discussion started by: ajay41aj
6 Replies
gettytab(5)							File Formats Manual						       gettytab(5)

Name
       gettytab - terminal configuration data base

Syntax
       /etc/gettytab

Description
       The  file  is  a simplified version of the data base used to describe terminal lines.  The initial terminal login process accesses the file
       each time it starts, allowing simpler reconfiguration of terminal characteristics.  Each entry in the data base is  used  to  describe  one
       class of terminal.

       There is a default terminal class, default, that is used to set global defaults for all other classes.  That is, the default entry is read,
       and then the entry for the class required is used to override particular settings.

Capabilities
       Refer to for a description of the file layout.  The default column below lists defaults	obtained  if  there  is  no  entry  in	the  table
       obtained, nor one in the special default table.

       -------------------------------------------------------------------
       Name   Type   Default	  Description
       -------------------------------------------------------------------
       ab     bool   false	  Auto-baud speed selection mechanism
       ap     bool   false	  Terminal uses any parity
       bd     num    0		  Backspace delay
       bk     str    0377	  Alternate  end of line character (input
				  break)
       cb     bool   false	  Use crt backspace mode
       cd     num    0		  Carriage-return delay
       ce     bool   false	  Use crt erase algorithm
       ck     bool   false	  Use crt kill algorithm
       cl     str    NULL	  Screen clear sequence
       co     bool   false	  Console - add 
 after login prompt
       ds     str    ^Y 	  Delayed suspend character
       ec     bool   false	  Leave echo 2OFF
       ep     bool   false	  Terminal uses even parity
       er     str    ^? 	  Erase character
       et     str    ^D 	  End of text 2EOF character
       ev     str    NULL	  Initial environment
       f0     num    unused	  Tty mode flags to write messages
       f1     num    unused	  Tty mode flags to read login name
       f2     num    unused	  Tty mode flags to leave terminal as
       fd     num    0		  Form-feed (vertical motion) delay
       fl     str    ^O 	  Output flush character
       hc     bool   false	  Do not hangup line on last close
       he     str    NULL	  Hostname editing string
       hn     str    hostname	  Hostname
       ht     bool   false	  Terminal has real tabs
       ig     bool   false	  Ignore garbage characters in login name
       im     str    NULL	  Initial (banner) message
       in     str    ^C 	  Interrupt character
       is     num    unused	  Input speed
       kl     str    ^U 	  Kill character
       lc     bool   false	  Terminal has lower case
       lm     str    login:	  Login prompt
       ln     str    ^V 	  ``literal next'' character
       lo     str    /bin/login   Program to exec when name obtained
       nd     num    0		  Newline (line-feed) delay
       nl     bool   false	  Terminal has (or might have) a  newline
				  character
       nx     str    default	  Next table (for auto speed selection)
       op     bool   false	  Terminal uses odd parity

       os     num    unused	  Output speed
       p8     bool   false	  Use 8-bit characters
       pc     str     	  Pad character
       pd     bool   false	  Disable parity on output
       pe     bool   false	  Use printer (hard copy) erase algorithm
       pf     num    0		  Delay  between first prompt and follow-
				  ing flush (seconds)
       ps     bool   false	  Line connected to a MICOM port selector
       qu     str    ^ 	  Quit character
       rp     str    ^R 	  Line retype character
       rw     bool   false	  Do not use raw for input, use cbreak
       sp     num    unused	  Line speed (input and output)
       su     str    ^Z 	  Suspend character
       tc     str    none	  Table continuation
       to     num    0		  Timeout (seconds)
       tt     str    NULL	  Terminal type (for environment)
       ub     bool   false	  Do unbuffered output (of prompts and so
				  forth)
       uc     bool   false	  Terminal is known upper-case only
       we     str    ^W 	  Word erase character
       xc     bool   false	  Do not echo control chars as ^X
       xf     str    ^S 	  XOFF (stop output) character
       xn     str    ^Q 	  XON (start output) character
       -------------------------------------------------------------------

       If  no  line  speed  is specified, speed will not be altered from that which prevails when is entered.  Specifying an input or output speed
       will override line speed for stated direction only.

       Terminal modes to be used for the output of the message, for input of the login name, and to leave the terminal set as upon completion, are
       derived	from  the  Boolean flags specified.  If the derivation should prove inadequate, any (or all) of these three may be overridden with
       one of the or numeric specifications, which can be used to specify (usually in octal, with a leading 0) the  exact  values  of  the  flags.
       Local (new tty) flags are set in the top 16 bits of this (32-bit) value.

       Should  receive	a  null character (presumed to indicate a line break), it will restart using the table indicated by the entry. If there is
       none, it will reuse its original table.

       Delays are specified in milliseconds; the nearest possible delay available in the tty driver will be used.   Should  greater  certainty	be
       desired, delays with values 0, 1, 2, and 3 are interpreted as choosing that particular delay algorithm from the driver.

       The screen clear string may be preceded by a (decimal) number of milliseconds of delay required (a la termcap).	This delay is simulated by
       repeated use of the pad character

       The initial message, and login message, and may include the character sequence to obtain the host name, to obtain the terminal name, and to
       obtain  the  date.  (%% obtains a single percent (%) character.)  The host name is normally obtained from the system, but may be set by the
       table entry.  In either case, it can be edited with The string is a sequence of characters; each character that is neither an at  sign  (@)
       nor  a number sign (#) is copied into the final host name.  An at sign (@) in the string causes one character from the real host name to be
       copied to the final host name.  A number sign (#) in the string causes the next character of the real host name to be skipped.  Surplus	at
       signs (@) and number signs (#) are ignored.

       When  executes  the login process, given in the string (usually it will have set the environment to include the terminal type, as indicated
       by the string, if it exists.  The string can be used to enter additional data into the  environment.   It  is  a  list  of  comma-separated
       strings, each of which should be of the form name=value.

       If  a  nonzero  timeout	is  specified  with then will exit within the indicated number of seconds, either having received a login name and
       passed control to or having received an alarm signal, and exited.  This may be useful to hang up dial-in lines.

       The flag allows use of 8-bit characters.

       The flag turns off parity on output.  Output from is even parity unless the flag, the flag, or the flag is specified.  The flag is used	to
       allow  any parity on input.  The flag may be specified with the flag to allow any parity on input, but generate odd(even) parity on output.
       The parity on output is accomplished by using the eighth bit as the parity bit.	does not check parity of input characters in RAW  mode	or
       8-bit mode.

       Terminals  that	are set up to operate in 8-bit mode should use entries which include the flag.	If a terminal that is set up in 8-bit mode
       fails to use an appropriate entry, the output from and can appear as multinational characters.  This is due  to	the  fact  that  uses  the
       eighth bit of characters to provide software generated parity.  The software parity generation will transform certain ASCII characters into
       multinational characters.  Earlier releases of the ULTRIX operating system did not display these multinational characters, due to the  lack
       of full 8-bit support in the terminal subsystem.

Restrictions
       Because	some users insist on changing their default special characters, it is wise to define at least the erase, kill, and interrupt char-
       acters in the default table.  In all cases, # or CTRL/H typed in a login name will be treated as an erase character, and @ will be  treated
       as a kill character.

       destroys the environment, so there is no point setting it in

See Also
       termcap(5), getty(8)

																       gettytab(5)
All times are GMT -4. The time now is 08:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy