The UNIX and Linux Forums  

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 here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Problem with accessing SAN disks michael.chow SUN Solaris 15 05-22-2008 05:50 AM
Problem accessing struct member jacques83 High Level Programming 1 11-28-2006 07:22 PM
newbie problem mpang_ Shell Programming and Scripting 2 06-17-2006 12:45 AM
Problem accessing network using Linux natter IP Networking 3 04-30-2003 11:18 AM
newbie problem please help Thump UNIX for Dummies Questions & Answers 2 02-20-2001 07:02 PM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-01-2006
Registered User
 

Join Date: Mar 2006
Posts: 1
Problem accessing csh ?? (Newbie)

Hi All,

Just recently started using a program in Unix for a client. I was sent a script to use but for some reason it's not working. The person who created the script first suggested I may need to edit the first line of the script so that it has the correct path for the csh file: #!/bin/csh -f

I checked that the csh file is in /bin and it is, but it's listed as: csh -> tcsh*
What does that mean?

When I run the script I get this message:
'nknown option: `-
Usage: csh [ -bcdefilmnqstvVxX ] [ argument ... ].

I'm new to Unix & would appreciate any help-
Thanks in advance!
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 03-01-2006
Registered User
 

Join Date: Feb 2006
Location: msk.ru.earth
Posts: 43
Quote:
tcsh is an enhanced but completely compatible version of the Berkeley UNIX C shell, csh(1).
and csh just link at tcsh.
you can use both.

-f means what shell ignores ~/.tcshrc, and thus starts faster.

read
$ man tcsh
for more information
Reply With Quote
  #3 (permalink)  
Old 01-04-2007
Registered User
 

Join Date: Jan 2007
Posts: 3
Hi,

It looks like the csh version that you are using on the current machine doesn't support the "-f" switch and hence you get the above error...

Best Regards,
brendon.
Reply With Quote
  #4 (permalink)  
Old 01-05-2007
Registered User
 

Join Date: Jan 2007
Posts: 3
Hi

Sorry for my last post ...coz it looks like the csh you are using supports "-f" switch.

It looks to me that your script is corrupted (might be with control-M characters while copying from windows to unix).Please run dos2unix on the script and then try running it.

Also use appropriate FTP mode (binary mode) while transfering your files from windows to unix if at all you are transferring.

Cheers,
Anand.
Reply With Quote
Google UNIX.COM
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 04:05 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0