LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   command for identifying the environment variable in a binary at the compilation time (http://www.linuxquestions.org/questions/linux-newbie-8/command-for-identifying-the-environment-variable-in-a-binary-at-the-compilation-time-850993/)

logeswari.r 12-17-2010 11:36 PM

command for identifying the environment variable in a binary at the compilation time
 
can any one help me ...How to Know the Environment Variable which has been used in a binary at the compilation Time


Thanks in adavance

paulsm4 12-18-2010 12:54 AM

What do you mean?

There is nothing in a binary object that "remembers" any environment variables that happened to exist when it was compiled.

But perhaps you mean something else?

logeswari.r 01-04-2011 07:02 AM

any advanced new commands in linux is available
Thanks and regards

logeswari.r 01-04-2011 07:03 AM

any linux commands are available which has been related to binary
Thanks and Regards

TheVillageIdiot 01-04-2011 07:26 AM

Based on the context of your question, i believe you're asking about compiled Executable files.

Executable files do not contain the environment variables of the system they were compiled under. I'm assuming that you might mean Preprocessor directives... and the compiler flags that are often used via scripts - For example ./configure -compile-withssl

Execuable files that do contain the compiler flags used to compile them are specifically coded into them in the form of Preprocessor directives - typically in the form of #IF , #ENDIF statements and the like. They aren't included in the executables automatically - they must be intentionally coded in.

If an application wishes to include the evironment variables of the system it was compiled under it would, like wise, have to be coded in specifically. Although accomplishing this would not necessarily require preprocessor directives.

See Links on Pre-Processor Directives (C++):

1. http://www.cplusplus.com/doc/tutorial/preprocessor/

2. http://en.wikipedia.org/wiki/C_preprocessor

Google for "Preprocessor directives" for more info.


If this is not what you meant, could you please provide a more descriptive reply - with examples.

Regards,

TheVillageIdiot

logeswari.r 03-02-2011 01:42 AM

can anyone help me to write a perl program for transfering binaries from one environment to another by the time basis



Thanks in Advance

chrism01 03-02-2011 07:12 PM

You should start a new thread for this new qn, in the Programming forum.
Ask the mods (via the Report button) to split this and move it.

In response, please show us what you've got so far.
Perl docs
http://perldoc.perl.org/
http://www.perlmonks.org/?node=Tutorials

Depends what you mean by 'time basis'; have you looked at cron http://www.adminschoice.com/docs/cro...Crontab%20file ?

logeswari.r 06-15-2011 09:34 AM

can anyone help me to cut the string in linux
if My String is this
/home/chsedev/goTX/karvy/dev/framework

i need
/home/chsedev/goTX/karvy/dev
as my answer

chrism01 06-15-2011 07:13 PM

As previously, start a new thread for each new qn; do NOT append to a current (& different ) thread.


All times are GMT -5. The time now is 01:46 PM.