LinuxQuestions.org
Review your favorite Linux distribution.
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 03-29-2011, 11:27 AM   #1
diemons
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Rep: Reputation: 0
Smile How to find the memory address(in FLASH) of a command in my shell script ?


Hello ,

Am new to this forum, as so to Linux

If i have a shell script to run on a Linux unit, which has a command to Reset(or say upgrade) the unit in between the script.Is it possible to find out the memory address of the next waiting command so that i can store the address to any environment variable in flash , then after Reset will continue Run from the stored address.

Am blind on how to implement this ...Help me !!

Thanks
 
Old 03-29-2011, 11:40 AM   #2
16pide
Member
 
Registered: Jan 2010
Posts: 418

Rep: Reputation: 83
are you running a shell script let's call it A) and don't know how to call another script (lets call it B) and want to continue script A where you left off when script B exits?

---------- Post added 03-29-11 at 05:41 PM ----------

and what scripting language are you using? (first line of your script should be #!/bin/...)
 
Old 03-29-2011, 02:30 PM   #3
diemons
LQ Newbie
 
Registered: Mar 2011
Posts: 4

Original Poster
Rep: Reputation: 0
Smile

Am trying to make it in a single file (say A) and when it exits in middle , will store it to some environment variable(which the Linux unit is aware of globally ). Then , will add a condition in startup process like *.init (not sure) , Example : say (if MEMADDRESS!=0) , "go MEMADDRESS" - which will continue the remaining of the script. Else , Exit the condition. Once the script A gets executed till the end , then we can overwrite MEMADDRESS to 0.

This is my plan. Lets see if this can be worked.

Also , pelase suggest if there's any alternatives.

Note: Am using shell script #!/bin/sh

Last edited by diemons; 03-29-2011 at 02:35 PM.
 
Old 03-29-2011, 02:48 PM   #4
toordog
Member
 
Registered: Jul 2010
Location: Montreal, Canada
Distribution: RedHat, Ubuntu, Solaris, AIX, BSD
Posts: 42

Rep: Reputation: 3
Quote:
Originally Posted by diemons View Post
Am trying to make it in a single file (say A) and when it exits in middle , will store it to some environment variable(which the Linux unit is aware of globally ). Then , will add a condition in startup process like *.init (not sure) , Example : say (if MEMADDRESS!=0) , "go MEMADDRESS" - which will continue the remaining of the script. Else , Exit the condition. Once the script A gets executed till the end , then we can overwrite MEMADDRESS to 0.

This is my plan. Lets see if this can be worked.

Also , pelase suggest if there's any alternatives.

Note: Am using shell script #!/bin/sh

I don't think I can help directly, but i think I can help other people to better understand.


I think your issue is either very complex and we will need much more detail to understand and find you the solution or you are trying to do it the wrong way.


1- Do you need to do parrallelism between your 2 scripts?
2- Is your server going to reboot in between the execution of the 2 scripts?
3- Why don't you just dump to a file or create a file that define the end status of the first script. (filename: succeed.script.status in /tmp that your second script will test if it exist or not).


Scripting is not compilation language like C, the logic should not be the same and I don't think you should seek to map the memory directly. Scripting is at another level where the OS is handling all the IO.
 
1 members found this post helpful.
  


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
[SOLVED] How to calculate flash memory end address of a certain file? jaepi Programming 6 03-15-2011 01:28 AM
[SOLVED] Find Physical address of memory provided by kmalloc raghu2383 Programming 3 10-23-2009 03:25 PM
Grab results of GRUB's find command into a shell script variable kushalkoolwal Programming 6 02-03-2009 06:04 PM
How can i find the flash address alice95089 Linux - Hardware 0 01-06-2005 10:23 PM
ni52 can't find memory, but address correct Wim_Woittiez Linux - Hardware 0 12-01-2003 02:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration