home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / shell / 3229 < prev    next >
Encoding:
Internet Message Format  |  1992-07-31  |  2.1 KB

  1. Path: sparky!uunet!mcsun!Germany.EU.net!unido!quando!steimann
  2. From: steimann@quando.quantum.de (Ulrich Steimann)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: Setting variables to ASCII codes in csh scripts
  5. Keywords: CSH ASCII ESCAPE CODES VARIABLES
  6. Message-ID: <1992Jul31.091545.15162@quando.quantum.de>
  7. Date: 31 Jul 92 09:15:45 GMT
  8. References: <1992Jul30.180327.10859@galileo.cc.rochester.edu>
  9. Organization: Quantum Software GmbH, Dortmund, Germany
  10. Lines: 48
  11.  
  12. In article <1992Jul30.180327.10859@galileo.cc.rochester.edu> eric@prodigal.psych.rochester.edu (Eric Hansen) writes:
  13. >
  14. >I'd like to 'echo' a table of variables to standard output, and since
  15. ><tab> doesn't always move to the same location on the screen (not in Unix,
  16. >anyways), I'd like to do a carriage return (no linefeed), and then move
  17. >the cursor right to a specific column.  Sort of like this:
  18. >
  19. >echo -n $CODE1$VAR1
  20. >echo -n $CODE2$VAR2
  21. >echo $CODE3$VAR3
  22. First, you have to do 
  23.     echo "$CODE$VAR"
  24. because the shell strips multiple blanks and gets confused with
  25. special characters.
  26.  
  27. >Does anyone know how to set variables to ASCII sequences of escapes and
  28. >what not?!  I could just 'echo' them out if it would be easier, but
  29. >it seems difficult to embed escape sequences in a file using vi (to put
  30. >the clear sequence in an 'echo' statement, I had to 'clear >> FILE' and
  31. >then cut and past!).
  32.  
  33. Move the cursor to an empty line and type
  34.     !clear
  35. The output of clear is then placed in the line. (try "man vi")
  36. For Cursor right, switch to input-mode and type CTRL-V followed by
  37. your cursor-right-key. The cursor-right-sequence is then palced in the
  38. text.
  39.  
  40. Is everybody on your machine using a vt100-Terminal? Hard-coded
  41. Sequences may cause strange effects on other terminals.
  42.  
  43. >Also, where can I get a listing of all the vt100
  44. >control codes and escape sequences?
  45.  
  46. man terminfo, termcap, untic, tput, ...
  47.  
  48. >
  49. >Thanks greatly!
  50. >
  51. >- Eric
  52.  
  53. Greetings,
  54.      UST
  55. -- 
  56. Ulrich Steimann, Quantum GmbH, D-4600 Dortmund | Warum heiraten ?
  57. email: steimann@quantum.de                     | 
  58. FAX: 0231-75441-115                            | Leasing ist doch
  59. -----------------------------------------------| so einfach !
  60.