The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Ambiguous and Command not found Error in UNIX koti_rama Shell Programming and Scripting 2 07-13-2007 09:42 AM
Ambiguous and Command not found Error in UNIX koti_rama UNIX for Dummies Questions & Answers 2 07-12-2007 08:44 AM
getting Ambiguous error on kill -9 @pid from csh umen Shell Programming and Scripting 0 03-02-2007 12:34 PM
ambiguous redirect mahabunta UNIX for Dummies Questions & Answers 1 09-15-2006 11:54 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #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
  #2 (permalink)  
Old 05-28-2007
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
Go through this link. I suggest you move to bash/ksh for your scripting needs.
  #3 (permalink)  
Old 05-29-2007
Guillermo Lopez Guillermo Lopez is offline
Registered User
  
 

Join Date: May 2007
Posts: 6
Thanks man!
I'm aware about the inconvenience about coding in csh but I'm working on a project that is all coded in csh so I must follow these rules. I'm working on the migration but is a whole back end and I this could not be done right now as it'll consume a lot of time, effort and money. That's the consequence of bad decisions in the past but I can't do anything about it :-).
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 03:37 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0