Sponsored Content
Full Discussion: K&R C code edits
Homework and Emergencies Homework & Coursework Questions K&R C code edits Post 302562889 by Corona688 on Saturday 8th of October 2011 08:13:49 PM
Old 10-08-2011
sed 's/a/b/' only replaces the first match per line. 's/a/b/g' replaces all of them.
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need help with scripting mass file edits..

Hello, I am wanting to know a way to shell (ksh)script-edit a file by having a script that searches for a specific string, and then input lines of text in the file after that specific string. Please help, as I will be up all night if I can't figure this out. (16 Replies)
Discussion started by: LinuxRacr
16 Replies

2. Shell Programming and Scripting

Multiple edits to a bunch of html files

I'm trying to upgrade a whole bunch of pages on my site to a new design. I thought one way of doing it would be to enclose the content in special comment tags and then use some form of script to wrap the new html around it. Like this: <!-- content start --> <h1>Blah blah blah</h1> yada yada... (9 Replies)
Discussion started by: dheian
9 Replies

3. Shell Programming and Scripting

PHP read large string & split in multidimensional arrays & assign fieldnames & write into MYSQL

Hi, I hope the title does not scare people to look into this thread but it describes roughly what I'm trying to do. I need a solution in PHP. I'm a programming beginner, so it might be that the approach to solve this, might be easier to solve with an other approach of someone else, so if you... (0 Replies)
Discussion started by: lowmaster
0 Replies

4. UNIX for Dummies Questions & Answers

Compile & Run Java Code

The java program is a part of speech tagger -> The Stanford NLP (Natural Language Processing) Group The goal is to use this script as part of a webpage to tag parts of speech based on a user-inputted string. I have no idea what to do with the files - I'm a complete *nix noob. I tried running... (4 Replies)
Discussion started by: tguillea
4 Replies

5. UNIX for Dummies Questions & Answers

OpenLDAP DB_CONFIG edits, changes live? or do I need run something

So I am probably missing something , but when I made edits to my DB_CONFIG file to fix form db_lock issues, the changes are not propagating after a service restart. Anyone know if I need to run anything else, or are the changes live? (0 Replies)
Discussion started by: jcejka
0 Replies

6. Shell Programming and Scripting

Problem with call of Java Programm & return code handling & output to several streams.

Hello Everybody, thanks in advance for spending some time in my problem. My problem is this: I want to call a java-Programm out of my shell skript, check if die return code is right, and split the output to the normal output and into a file. The following code doesn't work right, because in... (2 Replies)
Discussion started by: danifunny
2 Replies

7. UNIX for Dummies Questions & Answers

multiple text edits inone pass

File_1 looks like: bunch of text Untitled Placemark bunch of text bunch of text Untitled Placemark bunch of text bunch of text Untitled Placemark bunch of text File_2 looks like: Title_001 Title_002 Title_003 First: I need to replace the 1st occurence of "Untitled Placemark"... (2 Replies)
Discussion started by: kenneth.mcbride
2 Replies

8. Shell Programming and Scripting

SFTP Shell Script Get & Delete && Upload & Delete

Hi All, Do you have any sample script, - auto get file from SFTP remote server and delete file in remove server after downloaded. - only download specify filename - auto upload file from local to SFTP remote server and delete local folder file after uploaded - only upload specify filename ... (3 Replies)
Discussion started by: weesiong
3 Replies
ddi_mem_get8(9F)					   Kernel Functions for Drivers 					  ddi_mem_get8(9F)

NAME
ddi_mem_get8, ddi_mem_get16, ddi_mem_get32, ddi_mem_get64, ddi_mem_getb, ddi_mem_getl, ddi_mem_getll, ddi_mem_getw - read data from mapped device in the memory space or allocated DMA memory SYNOPSIS
#include <sys/ddi.h> #include <sys/sunddi.h> uint8_t ddi_mem_get8(ddi_acc_handle_t handle, uint8_t *dev_addr); uint16_t ddi_mem_get16(ddi_acc_handle_t handle, uint16_t * dev_addr); uint32_t ddi_mem_get32(ddi_acc_handle_t handle, uint32_t *dev_addr); uint64_t ddi_mem_get64(ddi_acc_handle_t handle, uint64_t *dev_addr); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI). The ddi_mem_get8(), ddi_mem_get16(), ddi_mem_get32(), ddi_mem_get64(), ddi_mem_getb(), ddi_mem_getl(), ddi_mem_getll(), and ddi_mem_getw() functions are obsolete. The ddi_get8(9F) function replaces ddi_mem_get8(). The ddi_get16(9F) function replaces ddi_mem_get16(). The ddi_get32(9F) function replaces ddi_mem_get32(). The ddi_get64(9F) function replaces ddi_mem_get64(). The ddi_get8(9F) function replaces ddi_mem_getb(). The ddi_get32(9F) function replaces ddi_mem_getl(). The ddi_get64(9F) function replaces ddi_mem_getll(). The ddi_get16(9F) function replaces ddi_mem_getw(). PARAMETERS
handle The data access handle returned from setup calls, such as ddi_regs_map_setup(9F). dev_addr Base device address. DESCRIPTION
These routines generate a read of various sizes from memory space or allocated DMA memory. The ddi_mem_get8(), ddi_mem_get16(), ddi_mem_get32(), and ddi_mem_get64() functions read 8 bits, 16 bits, 32 bits and 64 bits of data, respectively, from the device address, dev_addr, in memory space. Each individual datum will automatically be translated to maintain a consistent view between the host and the device based on the encoded information in the data access handle. The translation may involve byte-swapping if the host and the device have incompatible endian char- acteristics. CONTEXT
These functions can be called from user, kernel, or interrupt context. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Interface Stability |Obsolete | +-----------------------------+-----------------------------+ SEE ALSO
ddi_get8(9F), ddi_get16(9F), ddi_get32(9F), ddi_get64(9F), ddi_mem_put8(9F), ddi_mem_rep_get8(9F), ddi_mem_rep_put8(9F), ddi_regs_map_set- up(9F), ddi_device_acc_attr(9S) SunOS 5.11 1 Nov 2005 ddi_mem_get8(9F)
All times are GMT -4. The time now is 05:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy