10-10-2001
If you're running a script, the first thing to check is the sh-bang at the top of the file:
head -1 Scriptname
#!/bin/sh
or
#!/path/to/executable
Or which ever it may be. Next, verify that it's pointing to the correct place:
ls -l /bin/sh
or
ls -l /path/to/executable
If that doesn't work, there's your problem. You'll need to change the top line of the script to reflect where the shell it's calling is.
Also, if the file is binary (a program) it may have been damaged by being written to various filesystems. Also, it may not have been compiled to your system, in which case it can't use/find the shared libraries it was compiled to use. You probably won't be able to fix that easily... the best way would be to re-compile it, or get a binary built for your system.
One more thing, make sure the file is executable. Do a :
chmod u+x Scriptname
to set the eXecute bit.
One last thing, nake sure you are typing the file name exactly as it appears - Unix is case sensitive...
If that doesn't work, can you give us a little more information? The exact error, the script, etc...
Hope this helps!
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have here a UnixSlackware 2.01 disk that contains a so called SFR files, i want to open it on windows system since i dont have a unix system, is it posible ???
i tried to install WIPRO UWIN (korn shell) on my windows system but i cant access the floppydisk...
so is there a posible solution... (1 Reply)
Discussion started by: mharck29
1 Replies
2. UNIX for Dummies Questions & Answers
welll, the title quite explains what i want to do
thanks for your time! (4 Replies)
Discussion started by: kfaday
4 Replies
3. SCO
I have formatted a floppy disk under SCO unix.
Is there a way I could read this disk under another
operating system e.g. Windows or Linux? (1 Reply)
Discussion started by: sgertsos
1 Replies
4. Solaris
I am having trouble reading floppy and crom in single user mode.
running volcheck doesn't do anything
I am using Solaris -10 on Sun blade 150.
Has anybody seen this problem .. or do I have to manually mount the cdrom ...and floppy ???
thanks (2 Replies)
Discussion started by: ajnabi
2 Replies
5. UNIX for Dummies Questions & Answers
Regarding floppy drive ..
I need a command or a method by which i can detect a floppy drive is present or not ?
Thanks,
Priya. (4 Replies)
Discussion started by: priyam
4 Replies
6. SCO
help me please i am beguinner in SCO operating system
how i can read Floppy disk
i install SCO OpenServer5.02
i want to /mnt but no result (3 Replies)
Discussion started by: walidfinder
3 Replies
7. UNIX for Advanced & Expert Users
Hi the following c-code utilizing the 'read()' man 2 read method cant read in files larger that 2gig.
Hi I've found a strange problem on ubuntu64bit, that limits the data you are allowed to allocate on a 64bit platform using the c function 'read()'
The following program wont allow to allocate... (14 Replies)
Discussion started by: monkeyking
14 Replies
8. Shell Programming and Scripting
Hi
i am looking a way to look at a log file(log.txt) from the last time I've read it.
However after some days the main log file(log.txt) is rename to (log.txt.1).
So now i will have two log files as below.
log.txt.1
log.txt
Now, i have to read the log from the point where i have left... (3 Replies)
Discussion started by: sumitsks
3 Replies
9. Shell Programming and Scripting
HI,
I am trying to implement a simple shell script program that does not make use of ls or find commands as they are quite expensive on very large sets of files. So, I am trying to generate the file list myself. What I am trying to do is this:
1. Generate a file name using shell script, for... (2 Replies)
Discussion started by: shoaibjameel123
2 Replies
10. UNIX for Advanced & Expert Users
Dear community,
is it possible to add more volumes to actual LVM disk? I have the following:
# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 120G 0 disk
├─sda1 8:1 0 500M 0 part /boot
└─sda2 ... (0 Replies)
Discussion started by: Lord Spectre
0 Replies
GZEXE(1) General Commands Manual GZEXE(1)
NAME
gzexe - compress executable files in place
SYNOPSIS
gzexe name ...
DESCRIPTION
The gzexe utility allows you to compress executables in place and have them automatically uncompress and execute when you run them (at a
penalty in performance). For example if you execute ``gzexe /usr/bin/gdb'' it will create the following two files:
-rwxr-xr-x 1 root root 1026675 Jun 7 13:53 /usr/bin/gdb
-rwxr-xr-x 1 root root 2304524 May 30 13:02 /usr/bin/gdb~
/usr/bin/gdb~ is the original file and /usr/bin/gdb is the self-uncompressing executable file. You can remove /usr/bin/gdb~ once you are
sure that /usr/bin/gdb works properly.
This utility is most useful on systems with very small disks.
OPTIONS
-d Decompress the given executables instead of compressing them.
SEE ALSO
gzip(1), znew(1), zmore(1), zcmp(1), zforce(1)
CAVEATS
The compressed executable is a shell script. This may create some security holes. In particular, the compressed executable relies on the
PATH environment variable to find gzip and some standard utilities (basename, chmod, ln, mkdir, mktemp, rm, sleep, and tail).
BUGS
gzexe attempts to retain the original file attributes on the compressed executable, but you may have to fix them manually in some cases,
using chmod or chown.
GZEXE(1)