Article View: comp.unix.shell
Article #1876Problems with variable substitution in C-Shells
From: lim
Date: Fri, 30 Nov 1990 10:42
Date: Fri, 30 Nov 1990 10:42
22 lines
756 bytes
756 bytes
Hi, I'd appreciate any answers you may have to the following simple(?) question. It concerns variable substitution in a C-Shell: Suppose I have: @ num = 5 set str = num alias ech 'echo $\!*' So: (ech str) will output num, but (ech $str) won't output 5. The error message says: variable syntax. In other words: $str = num, but how may I do something like $($str) ? Thanks in advance. Jonathan Lim
Technical Details
Message-ID:
<11585.27563778@ecs.umass.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!sun-barr!cs.utexas.edu!sdd.hp.com!samsung!crackers!m2c!umvlsi!umaecs!limShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rutgers!sun-barr!cs.utexas.edu!sdd.hp.com!samsung!crackers!m2c!umvlsi!umaecs!lim From: lim@ecs.umass.edu Newsgroups: comp.unix.shell Subject: Problems with variable substitution in C-Shells Message-ID: <11585.27563778@ecs.umass.edu> Date: 30 Nov 90 10:42:00 GMT Lines: 22