LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
Search this Thread
Old 12-17-2010, 11:36 PM   #1
logeswari.r
LQ Newbie
 
Registered: Dec 2010
Posts: 5

Rep: Reputation: 0
Arrow 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
 
Old 12-18-2010, 12:54 AM   #2
paulsm4
Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
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?
 
Old 01-04-2011, 07:02 AM   #3
logeswari.r
LQ Newbie
 
Registered: Dec 2010
Posts: 5

Original Poster
Rep: Reputation: 0
any advanced new commands in linux is available
Thanks and regards
 
Old 01-04-2011, 07:03 AM   #4
logeswari.r
LQ Newbie
 
Registered: Dec 2010
Posts: 5

Original Poster
Rep: Reputation: 0
any linux commands are available which has been related to binary
Thanks and Regards
 
Old 01-04-2011, 07:26 AM   #5
TheVillageIdiot
LQ Newbie
 
Registered: Sep 2003
Posts: 9

Rep: Reputation: 0
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

Last edited by TheVillageIdiot; 01-04-2011 at 07:48 AM.
 
Old 03-02-2011, 01:42 AM   #6
logeswari.r
LQ Newbie
 
Registered: Dec 2010
Posts: 5

Original Poster
Rep: Reputation: 0
can anyone help me to write a perl program for transfering binaries from one environment to another by the time basis



Thanks in Advance
 
Old 03-02-2011, 07:12 PM   #7
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,226

Rep: Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022Reputation: 2022
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 ?
 
Old 06-15-2011, 09:34 AM   #8
logeswari.r
LQ Newbie
 
Registered: Dec 2010
Posts: 5

Original Poster
Rep: Reputation: 0
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
 
Old 06-15-2011, 07:13 PM   #9
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,226

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dansguardian binary file in /usr/local/sbin dies out from time to time? linuxlover.chaitanya Linux - Server 3 05-21-2010 02:01 AM
Better to use "at" command instead of time variable in shutdown? rjo98 Linux - Newbie 14 04-20-2010 12:54 PM
Identifying network devices at boot time. robertkey Linux - Networking 2 01-10-2009 12:58 AM
'ps' command - true meaning of 'pcpu' & 'time' values in a multi-CPU environment MarkTurbo Linux - Newbie 5 02-02-2008 04:48 AM
Setting environment variable to current date/time nafan Programming 1 08-23-2004 09:04 PM


All times are GMT -5. The time now is 07:10 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration