Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How to write a value to a physical memory address in bash script? Post 303043660 by rabrandt on Monday 3rd of February 2020 09:33:55 AM
Old 02-03-2020
How to write a value to a physical memory address in bash script?

How would I write a value to a physical memory address?
I was able to read a physical memory address (for example, 0x400) using this line:
Code:
    dd if=/dev/mem count=4 bs=1 skip=$(( 0x400 ))

But I get an error:
Code:
dd: 'standard input': cannot skip to specified offset

when I try to write using this method
Code:
  function T_WRITE2 {
    printf $1 | dd of=/dev/mem count=4 bs=1 skip=$(( 0x400 ))
  }

Any suggestion?

Last edited by Yoda; 02-03-2020 at 02:23 PM..
rabrandt
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

physical memory

It is just a general question....is there a limit on the memory? I am looking into a process to store image files on the unix server which will be accessed by the application, and I just wonder if there is any limit regarding the physical or virtual memory. I am very new to unix, so thanks for... (1 Reply)
Discussion started by: cchien
1 Replies

2. AIX

Physical and Logical IP address

Hi all I need command to give logical and physical IP Address for my machine. thank you (1 Reply)
Discussion started by: magasem
1 Replies

3. Solaris

physical memory

what is the command to find the physical memory in soalris OS and how to find whether paging is happening or not ? (2 Replies)
Discussion started by: jayaramanit
2 Replies

4. Solaris

How to find Total and Free Physical Memory and Logical Memory in SOLARIS 9

Hi, Im working on Solaris 9 on SPARC-32 bit running on an Ultra-80, and I have to find out the following:- 1. Total Physical Memory in the system(total RAM). 2. Available Physical Memory(i.e. RAM Usage) 3. Total (Logical) Memory in the system 4. Available (Logical) Memory. I know... (4 Replies)
Discussion started by: 0ktalmagik
4 Replies

5. Solaris

Add Static Routes to new physical address

Hi, I need help to add new route: 10.252.0.138, GW 10.252.0.129 to e1000g1 and 10.252.0.10, GW 10.252.0.1 to e1000g2 tnx (4 Replies)
Discussion started by: mehrdad68
4 Replies

6. AIX

Hardware address to physical location

Hello How do I deternine the physical location of an ethernet port, based on the hardware address? I have 4 ports on a 9133-55A ent0 05-08 ent1 05-09 ent2 07-08 ent3 07-09 Two of these are internal, and two are on a card. I need to single out ent0 and ent2, but I cannot find any... (4 Replies)
Discussion started by: mhenryj
4 Replies

7. Programming

help with C++ code that relate the object with physical address

I need some help to write a C++ code that read and write the register of a sequencer. I have to make a code that relate the objects with the physical address but I am a bit confuse. Could someone suggest me how to proceed? in which parts do I split the code? thanks (1 Reply)
Discussion started by: silviafisica
1 Replies

8. Solaris

restrcit physical memory with zone.max-locked-memory

Is it possible to restrict physical memory in solaris zone with zone.max-locked-memory just like we can do with rcapd ? I do not want to used rcapd (1 Reply)
Discussion started by: fugitive
1 Replies

9. UNIX for Dummies Questions & Answers

What would the physical address be for virtual address?

Hi guys, I got one problem which I definetily no idea. What would the physical address be for virtual address? 1) 2ABC 2) 3F4B Here is the page table:see attached Thank you sos sososososso much!! (0 Replies)
Discussion started by: lemon_06
0 Replies

10. Shell Programming and Scripting

how to write script to change email address

we have 4000 html pages that need an email address changed. eg) company@yahoo.com to company@hotmail.com we only want the file modified date to be changed when there has been a change to the file. Should I be using grep? I fairly new to UNIX and was told to using something like... (2 Replies)
Discussion started by: mchelle_99
2 Replies
LIBBASH(7)							  libbash Manual							LIBBASH(7)

NAME
libbash -- A bash shared libraries package. DESCRIPTION
libbash is a package that enables bash dynamic-like shared libraries. Actually its a tool for managing bash scripts whose functions you may want to load and use in scripts of your own. It contains a 'dynamic loader' for the shared libraries ( ldbash(1)), a configuration tool (ldbashconfig(8)), and some libraries. Using ldbash(1) you are able to load loadable bash libraries, such as getopts(1) and hashstash(1). A bash shared library that can be loaded using ldbash(1) must answer 4 requirments: 1. It must be installed in $LIBBASH_PREFIX/lib/bash (default is /usr/lib/bash). 2. It must contain a line that begins with '#EXPORT='. That line will contain (after the '=') a list of functions that the library exports. I.e. all the function that will be usable after loading that library will be listed in that line. 3. It must contain a line that begins with '#REQUIRE='. That line will contain (after the '=') a list of bash libraries that are required for our library. I.e. every bash library that is in use in our bash library must be listed there. 4. The library must be listed (For more information, see ldbashconfig(8)). Basic guidelines for writing library of your own: 1. Be aware, that your library will be actually sourced. So, basically, it should contain (i.e define) only functions. 2. Try to declare all variables intended for internal use as local. 3. Global variables and functions that are intended for internal use (i.e are not defined in '#EXPORT=') should begin with: __<library_name>_ For example, internal function myfoosort of hashstash library should be named as __hashstash_myfoosort This helps to avoid conflicts in global name space when using libraries that come from different vendors. 4. See html manual for full version of this guide. AUTHORS
Hai Zaar <haizaar@haizaar.com> Gil Ran <ril@ran4.net> SEE ALSO
ldbash(1), ldbashconfig(8), getopts(1), hashstash(1) colors(1) messages(1) urlcoding(1) locks(1) Linux Epoch Linux
All times are GMT -4. The time now is 11:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy