Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Aug 2000 10:03:17 -0700
From:      Kent Stewart <kstewart@urx.com>
To:        igorr@crosswinds.net
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Newbie need help to execute a shell script
Message-ID:  <39AA9B55.419E92EC@urx.com>
References:  <20000828134505.EBA6F1F17@static.unixfreak.org> <39AA719A.1F3B9E97@devises-or.com> <20000828182757.A21602@linux.rainbow> <39AA7B69.D231BA3C@devises-or.com> <20000828190308.A21842@linux.rainbow> <39AA96D1.2C478561@devises-or.com> <20000828205830.A22674@linux.rainbow>

next in thread | previous in thread | raw e-mail | index | archive | help


Igor Roboul wrote:
> 
> On Mon, Aug 28, 2000 at 12:44:01PM -0400, Claude Cormier wrote:
> > Created on Win PC and uploaded it... Why?  Is this a problem.. I've been
> > doing this for all my PHP scripts which run fine in my browser... Is it
> > different running from the shell?
> Try to create this file on Unix side.
> cat >disp2
> _enter_your_script_
> _press_Ctrl+D
> chmod 755 disp2
> ./disp2

He would be seeing "^M" on the end of the line if he had an <cr><lf>
problem.

I think something else is going on. I took his script and did a cut
and paste from a telnet session on Win 2000. I didn't do any except
add the #! /bin/sh line and delete his \\ tail ends. The output looks
like

ruby# display
Date and time is:
Mon Aug 28 09:59:27 PDT 2000

Your username is: root
Your current directory is:
/root
ruby# cat bin/display
#!/bin/sh
# This script displays the date, time, username and
# current directory.
echo "Date and time is:"
date
echo
echo "Your username is: `whoami`"
echo "Your current directory is:"
pwd

It works on my system.

Kent

> 
> --
> Igor Roboul, Unix System Administrator & Programmer @ sanatorium "Raduga"
> http://www.brainbench.com/transcript.jsp?pid=304744
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message

-- 
Kent Stewart
Richland, WA

mailto:kbstew99@hotmail.com
http://kstewart.urx.com/kstewart/index.html
FreeBSD News http://daily.daemonnews.org/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39AA9B55.419E92EC>