DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD General

OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 12th August 2016
psypro psypro is offline
Package Pilot
 
Join Date: Mar 2016
Location: Continent:Europe
Posts: 156
Default ksh scripts

I want to help seed linux and bsd to the world. So I have set up a seedbox for linux/bsd torrent files.

Code:
#!/bin/ksh

# Fetch Debian torrent

wget -r -l 10 -A *.torrent -nd -P /home/pi/torrent/debian 
http://cdimage.debian.org/debian-cd/8.5.0

exit
From command line i dont get it to work as a script file.
ksh debian.torent
wget: missing url

If i only run it as a command it works and download 100s of debian torrent in a few minutes.
Code:
 wget -r -l 10 -A *.torrent -nd -P /home/pi/torrent/debian 
http://cdimage.debian.org/debian-cd/8.5.0
I have mange to make similar script in bash work in before, what can I do to make it work in ksh?

(updated script to /bin/ksh, from /usr/bin/ksh, still does not work)

Last edited by psypro; 12th August 2016 at 08:23 PM.
Reply With Quote
  #2   (View Single Post)  
Old 12th August 2016
psypro psypro is offline
Package Pilot
 
Join Date: Mar 2016
Location: Continent:Europe
Posts: 156
Default

Made a test script.

File name: test.script
Code:
#! /bin/ksh

echo "Hello"
date
Code:
chmod +x test.script
Code:
./test.script
Hello
Fri aug 12 22:27 ...

So I made my first working ksh script!
Reply With Quote
  #3   (View Single Post)  
Old 12th August 2016
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,977
Default

Is your "wget" command spread over two lines of your file? If so, you must use a backslash "\" escape character as the last character on the first of the two lines.

(It actually escapes the unseen new-line character which follows in the ASCII file.)
Reply With Quote
  #4   (View Single Post)  
Old 12th August 2016
psypro psypro is offline
Package Pilot
 
Join Date: Mar 2016
Location: Continent:Europe
Posts: 156
Default

A thank you, now it is working just fine.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't load any scripts in ircII guitarscn General software and network 4 22nd November 2010 12:06 AM
ppp scripts help wokko NetBSD Installation and Upgrading 10 18th May 2010 05:29 AM
Executing web scripts : can't! erehwon OpenBSD General 3 3rd November 2009 10:02 PM
Windows scripts can't print drhowarddrfine Other OS 15 31st March 2009 08:53 AM
Periodic scripts for mail scripts stukov FreeBSD General 2 8th March 2009 07:51 PM


All times are GMT. The time now is 03:14 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick