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



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

Reply
English Japanese Spanish French German Portuguese Italian Powered by Powered by Google
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-18-2009
Registered User
 

Join Date: Oct 2009
Posts: 8
Cool tsch, error setting a variable

Hi,
my code is:
------------------------------
set r=`ls -L $source_dir/*.snvf`
echo AAA
------------------------------

If does file does not exists I got on the screen

ls: No match.
AAA

How can I remove the "ls: No match." from being printed out

Regards,
Ziv
Sponsored Links
  #2 (permalink)  
Old 10-18-2009
scottn's Avatar
scottn scottn is offline Forum Staff  
Moderator
 

Join Date: Jun 2009
Location: Zürich, CH
Posts: 1,858
Hi.

Tcsh is a really horrible shell. Can't you use a "proper" shell?!

I've googled, experimented and guessed, and can't find a solution.

So I give you this:


Code:
set p=`ksh -c "ls -L $source_dir/*.snvf 2>/dev/null"`

(or bash -c ...)

Last edited by scottn; 10-18-2009 at 12:40 PM..
  #3 (permalink)  
Old 10-18-2009
Registered User
 

Join Date: Oct 2009
Posts: 8
Thanks

It help me a lot
Sponsored Links
Reply

Bookmarks

Tags
tcsh error set variable print

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 Off


More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Error in setting PATH variable in bash shell padmisri Shell Programming and Scripting 2 07-20-2009 05:56 AM
Why isn't this working? tsch-doit file lost UNIX for Dummies Questions & Answers 1 02-26-2009 11:34 AM
Help with setting a variable! Pablo_beezo Shell Programming and Scripting 2 07-11-2008 08:15 AM
tsch script problem (dealing with sed) csnewbie84 Shell Programming and Scripting 10 05-02-2007 11:51 PM
how to change sh to tsch UNIX simt UNIX for Dummies Questions & Answers 2 12-19-2003 05:03 PM



All times are GMT -4. The time now is 01:25 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-2010. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0