View Full Version : Shell scripts running at Knoppix
majales
05-12-2003, 10:29 AM
Is is possible to run shell scripts under CD booted Knoppix?
I've tried to run simple script in root shell but I've had no luck.
I've got an error ": bad interpreter : No such file or directoryin/sh"
The first line of my script is just "#!/bin/sh"
Did I miss something?
MaJaLes
mabhatter
05-13-2003, 01:45 AM
some thing have to be run from console not x-term
go CTRL-ALT-F2 [remember ALT-F5 to get back!]
this brings up root console
enter "password" to set a new root password!
drill down the directory till you find your script and you should be all set!
Now you can run shell scripts "sh runme" and they should work just fine
Some scripts will run without the extra work, but you have to be very literal about where you run them from. You have to remember to specify the proper directory path to them. I've found if you save them to the Desktop that more will run from X-term because the x-term can "see" the Desktop folder without a bunch of monkey business. An added benifit is that you can save the files for later with the save config menu option too! [choose to save desktop files!] They restore when you use the floppyconfig or myconfig=scan command!
cascadefx
05-15-2003, 04:21 PM
Is is possible to run shell scripts under CD booted Knoppix?
I've tried to run simple script in root shell but I've had no luck.
I've got an error ": bad interpreter : No such file or directoryin/sh"
The first line of my script is just "#!/bin/sh"
Did I miss something?
MaJaLes
This works fine in mine. I created the script on the Desktop and ran it from the root shell.
Post your script so that others can try it and help troubleshoot the problem. This should work! On my system, the shell interprets everything just fine.
try creating the following script on the Desktop. Call it testscript:
#! /bin/sh
ls -asl / >> test.txt
Then make it executable:
chmod u+x testscript
now execute it either with sh testscript or by itself (since we made it executable) with testscript
It should just work
Powered by vBulletin® Version 4.2.2 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.