-
Shell scripts running at Knoppix
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
-
been there too
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!
-
Re: Shell scripts running at Knoppix

Originally Posted by
majales
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:
Code:
#! /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
Similar Threads
-
By sunburnt in forum Tips and Tricks
Replies: 5
Last Post: 05-28-2005, 05:39 PM
-
By splittik in forum General Support
Replies: 1
Last Post: 03-22-2005, 07:38 AM
-
By helios17 in forum General Support
Replies: 1
Last Post: 10-01-2004, 06:53 AM
-
By pankajgadhari in forum General Support
Replies: 1
Last Post: 01-07-2004, 06:33 AM
-
By colinmc151 in forum Customising & Remastering
Replies: 3
Last Post: 11-10-2003, 11:40 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

Dell 6P85J 4TB ST4000NM0063 7.2k 6Gb/s 3.5” SAS SED Hard Drive with Tray
$39.99

Western Digital HUS726T4TAL5204 4TB 7.2K SAS 12Gb/s 3.5" 512e HDD NetApp X375A
$64.00

DELL 2TB Enterprise HDD (7200RPM, 3.5", SATA III, 128MB Cache) HUS722T2TALA600
$49.95

(ST8000NM0045) SEAGATE ENTERPRISE 8TB 7200RPM 4Kn SATA 6Gb/s 3.5" HARD DRIVE
$199.99

Seagate ST4000NM0034 Enterprise 4TB 7200RPM SAS 12Gb/s HDD v4
$39.00

Seagate ST500DM009 BarraCuda 500 GB 3.5" SATA III Desktop Hard Drive
$14.99

HGST HUS726060ALE610 0F23001 6TB HDD 3.5" SATA 6Gb/s 7.2K Hard Drive (V6315)
$69.95

Dell ST6000NM0034 1HT27Z-150 NWCCG 6TB SAS 3.5 7.2K ENTERPRISE SERVER DRIVE
$68.99

Seagate ST8000NM0075 Enterprise Capacity 3.5 HDD 8TB SAS Hard Drive 8TB EXOS
$184.99

Seagate ST12000NM0127 12TB 256MB 7200RPM 3.5" SATA 6.0Gb/s Enterprise Hard Drive
$318.99