The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 05-28-2007
Guillermo Lopez Guillermo Lopez is offline
Registered User
  
 

Join Date: May 2007
Posts: 6
`ls -l`: Ambiguous

Hi,
I'm trying to code a simple script (c-shell) on a Solaris box and I'm getting an "Ambiguous" error. These are the lines that cause the error:

On c-shell:

> set var = ""
> @ var = `ls -l`
`ls -l`: Ambiguous

However if I change the second line to:

> set var = `ls -l`

This works ok but I'm not sure why. I believe and I may be wrong that to change the value of an already defined variable I should use the syntax as in my first example (@ var = X) but there is obviously something that I'm not understanding very well. This may be only for numerical calculations. Please I accept any comment about this error.

Thanks!

Guillermo