From owner-freebsd-questions Tue Sep 22 15:28:21 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA17165 for freebsd-questions-outgoing; Tue, 22 Sep 1998 15:28:21 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from mail.IDFW.COM (imail3.INTERLAND.NET [207.86.246.2]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id PAA17095 for ; Tue, 22 Sep 1998 15:27:55 -0700 (PDT) (envelope-from frankg@idfw.com) Received: from fast1.dfw.com [207.136.46.175] by mail.IDFW.COM (SMTPD32-4.06) id A459B40106; Tue, 22 Sep 1998 18:27:37 EDT Message-ID: <001201bde677$f65675c0$0200a8c0@fast1.dfw.com> From: "Frank Griffith" To: Subject: Need help with sh script Date: Tue, 22 Sep 1998 17:25:50 -0500 X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 4.72.2106.4 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I am no programmer but I finally came across enough information to put together a script which will determine my latest Dynamic IP address from my ISP and prepare an HTML document with a link to this IP address in it. The script wilI then ftp the HTML doc to my server where I keep a static IP. Everyone follow so far? I call the script dyn Problem is I get to the last step and something goes wrong. Here are the important parts of the script. #!/bin/sh # $REMOTE_SERVER="ftp.idfw.com" $TMPDIR="/usr/tmp" $TSCPT="ftp.script" . . . #Here's where the FTP script is supposed to take over ftp $REMOTE_SERVER > $TMPDIR/$TSCPT &/dev/null # # note: the script will run and exit without error if the above # line is remarked out. . . . exit When the script starts to FTP the file I get this error message: ./dyn: /dev/null: permission denied ---------------------------------------------------------------------------- -------- The ftp.script file referenced is a small text file like this: put /usr/tmp/myip.htm /html/myip.html quit ---------------------------------------------------------------------------- -------- I run the script as root. My /root directory contains a file called .netrc and it looks like this: default login login_id password pass_word I use my regular login_id and pass_word with superuser rights in this command line ---------------------------------------------------------------------------- -------- This thing makes a beautiful HTML page with my dynamic IP address linked on it. If someone can steer me in the right direction here on what's wrong, I'll be glad to share the whole script with everyone once I get it working. Thanks. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message