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

  1. Path: sparky!uunet!mcsun!Germany.EU.net!unido!quando!steimann
  2. From: steimann@quando.quantum.de (Ulrich Steimann)
  3. Newsgroups: comp.unix.questions
  4. Subject: Re: Redirecting the date as a file name
  5. Keywords: date multiple-spaces
  6. Message-ID: <1992Jul25.130621.9344@quando.quantum.de>
  7. Date: 25 Jul 92 13:06:21 GMT
  8. References: <bacon.711843971@odin> <1992Jul24.073019.4230@ericsson.se> <1992Jul24.212358.3310@news.arc.nasa.gov>
  9. Organization: Quantum Software GmbH, Dortmund, Germany
  10. Lines: 23
  11.  
  12. In article <1992Jul24.212358.3310@news.arc.nasa.gov> rages@pan.arc.nasa.gov (kathy rages) writes:
  13. >This gives rise to a question, which I have yet to find an answer to.
  14. >How do you force the inclusion of two or more consecutive spaces in
  15. >a variable string?
  16. >
  17. >% date +%h"  "%d
  18. >Jul  24
  19. >% set today = `date +%h"  "%d`
  20. >% echo $today
  21. >Jul 24
  22. >
  23.  
  24. Try:    echo "$today"
  25. With `echo $today' the variable today is parsed by the shell. echo
  26. gets two arguments. If you put it into ", echo gets one argument.
  27.  
  28. Greetings,
  29.     UST
  30. -- 
  31. Ulrich Steimann, Quantum GmbH, D-4600 Dortmund | Warum heiraten ?
  32. email: steimann@quantum.de                     | 
  33. FAX: 0231-75441-115                            | Leasing ist doch
  34. -----------------------------------------------| so einfach !
  35.