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?
thanks
Reinhold
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
#!/bin/bash
echo Hello World
cp main main.bak
cat main.bak | sed “s/export LD_ASSUME_KERNEL/#xport LD_ASSUME_KERNEL/” > main
./main
#!/bin/bash
echo Hello World
cp main main.bak
sed "s/export LD_ASSUME_KERNEL/#xport LD_ASSUME_KERNEL/" main.bak > main
./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.
TrollSoft wrote:
| hi,
| i found an apropriate tutorial.
| everything works now
| thanks
|
|
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org