This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: writing csh scripts with cygwin


I think Christopher Spears wrote:

> #csh that gives system status
> 
> set d = `date`
> echo "Today's date: $d[2-3] $d[6]"
> echo "Current time: $d[4]"
> echo Number of users: `who | wc -l`
> echo Current disk storage: ` du -s .`
> 

You need to include a 

#!/bin/tcsh

line at the top of the script to tell Cygwin that this is a tcsh
script, not a bash script.



---------------------------------------------------------
Ernest Friedman-Hill  
Science and Engineering PSEs        Phone: (925) 294-2154
Sandia National Labs                FAX:   (925) 294-2234
PO Box 969, MS 9012                 ejfried@ca.sandia.gov
Livermore, CA 94550         http://herzberg.ca.sandia.gov

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]