Running csh script after ftp via W2K

From: Tom Linden (tom@kednos.com)
Date: Fri Feb 18 2005 - 11:18:38 EST


I had to poer up a 4.0d machine and discovered
that the license paks had expired. Logged in as
root and transferred the license pak file
My login shell is bash so I run the script as
root> /bin/csh pak.txt
then^M: Command not found.

but there seems to be a problem recognizing end of line.

When I dump the file I can see the lines are terminated
with cr nl ( OX0d 0X0a or ^J ^M )

When I read the file with emacs and search for ^M none is
found, but ^J is.

How should the lines be terminated for the csh?

I guess ^J. Any tips for stripping out the ^M?

The first few lines of the file start

#!/bin/csh
#
# *******************************************************************
# Issued by the License Key Management Group
# Nashua - New Hampshire - USA
# *******************************************************************
#
if `whoami` != "root" then
   echo "You must be superuser to run this script"
   exit 1
endif

test -r /etc/lmf
if ($status != 0) then
   set lmfcom="/usr/sbin/lmf"
else
   set lmfcom="/etc/lmf"
endif

echo ""



This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 10:50:15 EDT