04-28-2003
putting #!/bin/sh wont work because your file a.out is a binary file. if you write a c++ program for example and compile it with:
g++ file.c
g++ will output a file named 'a.out'
you have to use ./a.out to execute most programs. if you really dont want to use ./ to execute your program then you can put it in /usr/bin and make sure /usr/bin/ is in your PATH (it probably is).
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
hi,
I am writing c++ code in unix operating system.In that i need to set the environment variable in unix.
suppose previously i have environment variable like path="something" now i need to change the path value to some othervalue . so that some other program will access that path value... (1 Reply)
Discussion started by: sada@123
1 Replies
2. Linux
Hi,
I am quite new to Linux. And I have doubt how to set new environment variable with value to a C executable.
Let say I have a environment variable $Hack ;
I would like to load a value for this variable; so that when the C executable is executed, the $Hack would set the variable value.
... (4 Replies)
Discussion started by: ahjiefreak
4 Replies
3. Shell Programming and Scripting
I am running this pre-script with a post scripts that needs to share the same variables. How do I keep the environment variable settings for the next script to access from the RMAN Script?
Prescript #1
#RMAN Script
#!/bin/ksh
ORACLE_SID=INVPRD;export ORACLE_SID... (1 Reply)
Discussion started by: gzs553
1 Replies
4. Solaris
I am working with solaris 9 sunBlade150 Box.
I Installed a program, need to set the environment variable so that when the executable is entered,it finds the path to the executable.
The documentation for the software says: Set the appropriate environment variable:
Connect to server failed;... (8 Replies)
Discussion started by: smartgupta
8 Replies
5. Shell Programming and Scripting
Hi,
I can run shell script from the command line using
$ . set
If the run the script inside perl script using
$var = system("set");
print $var;
This prints 0.
This command sets up the environment from command line. But when used inside the shell script or perl script it... (2 Replies)
Discussion started by: sandy1028
2 Replies
6. SCO
i have two machines that should be identical but on one system there are some oracle environment (ORACLE_SID, ORACLE_HOME, etc...) variables that are not being set for the users.
I am trying to find where those environment variables are being set on the system which is working properly. All... (5 Replies)
Discussion started by: kuliksco
5 Replies
7. Shell Programming and Scripting
I have test.pl scrit with these few lines.
#!/usr/bin/perl
$ENV{'ORACLE_SID'} = "D3771";
$ENV{'ORACLE_HOME'} = "/oracle/product/10.2.0/db_1";
When I try . test.pl it throws an error. When I try test.pl, it doesn't reaing the variables I set in the script.
-> . test.pl
ksh:... (10 Replies)
Discussion started by: MKNENI
10 Replies
8. Shell Programming and Scripting
Hi,
I am pretty new in writing shell script on LINUX, I tried to write the script just like KSH on HP unix but it seems nothing is working. Even assigning variables seems to be not working as KSH on HP unix. Please help in resolving the issues I am facing on LINUX. I have declared variables for... (5 Replies)
Discussion started by: smr.ryl
5 Replies
9. Shell Programming and Scripting
Hi
Could you please tell me how to set environment variables in Unix ksh.
And how can acess those varibles in shell scripts
( Please give the code with an example)
For my scenario.
We have written number of shell scripts with hard coded username and password.
But if we want to... (1 Reply)
Discussion started by: shyamu544
1 Replies
10. UNIX for Beginners Questions & Answers
I just started a new job and I've been tasked with cleaning up the files that set up all the environment variables. The system works as is. What happens is:
1. You log in to the server.
2. You call a file that sets a bunch of environment variables and that displays a list of all the databases... (4 Replies)
Discussion started by: Keyeh
4 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)