simple shell script

echo hallo world

this very simple shell-script will not work. chmod 777 was set. logging in as superuser changed nothing. I am using openSuse-11 beta. Within a quickly installed Ubuntu-Linux this script works.
Has someone any idea?

Can you tell us what you mean by “It would not work”? Are there any errors? Does it just not do anything? How are you invoking it? This works for me:

$ cat >etest
echo Hello World
$ chmod 777 etest
$ ./etest
Hello World

for me it works fine too:

echo echo hello world > test;chmod 750 test;./test


thanks for the answers.

I used a second file for the script and everything works fine. But now to the real problem:

I compiled a shared library and a main with g++. Both were developed under Windows. Compilation was ok. But when starting the main, I got the error
main: error while loading shared libraries … no such file
someone told me to use following script. The script now works, but the library error goes on.

has someone any idea

echo Hello World
cp main main.bak
cat main.bak | sed “s/export LD_ASSUME_KERNEL/#xport LD_ASSUME_KERNEL/” > main

btw you do not need the cat:

echo Hello World
cp main main.bak 
sed "s/export LD_ASSUME_KERNEL/#xport LD_ASSUME_KERNEL/" main.bak > main

I do not see what the added value of the **echo **is to the script.

I suppose this script does anyhow do something because it consists of legal constructs. But as you do not tell what your intention is, I can not know what is wrong or right with it. As I see it it will change all occurencies of “export LD_ASSUME_KERNEL” into “#xport LD_ASSUME_KERNEL” in the file main. It also creates a file main.bak with the original contents of main.
Now when this was that you think it should do, your script seems OK to me.

Youir real problem seems to be with the program main. But not with this script.

i found an apropriate tutorial.
everything works now

Hash: SHA1

Care to share?

Good luck.

TrollSoft wrote:
| hi,
| i found an apropriate tutorial.
| everything works now
| thanks
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla -