www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/04/08/15:36:48

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <20040408193540.69076.qmail@web12403.mail.yahoo.com>
Date: Thu, 8 Apr 2004 12:35:40 -0700 (PDT)
From: Christopher Spears <cspears2002 AT yahoo DOT com>
Subject: more csh
To: cygwin AT cygwin DOT com
MIME-Version: 1.0

Eureka!  #!/bin/tcsh does the trick!

However, now that csh is reading the script:

#!/bin/tcsh

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 ~`

I have encountered another problem.  Here is the
response:

Today's date: Apr 8 2004
Current time: 12:30:44
Number of users: 0

The last line of my script must not have been
executed!  How could this be?!

BTW, I realize that some of my questions may be more
about scripting instead of cygwin.  Can anyone
recommend any good forums for shell scripting?  I'm
especially interested in forums for beginners.

-Chris

=====
"I'm the last person to pretend that I'm a radio.  I'd rather go out and be a color television set."
-David Bowie

"Who dares wins"
-British military motto

"The freak is the norm." - "The Infernal Desire Machines of Dr. Hoffman" by Angela Carter

--
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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019