Running csh script after ftp via W2K

From: Tom Linden <tom_at_kednos.com>
Date: Fri, 18 Feb 2005 08:18:38 -0800

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 ""
Received on Fri Feb 18 2005 - 16:27:59 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT