Sponsored Content
Full Discussion: Adding a block to the file
Top Forums Shell Programming and Scripting Adding a block to the file Post 302227119 by ROOZ on Wednesday 20th of August 2008 04:34:37 PM
Old 08-20-2008
I just posted another question which is related to this problem, lets say i just focus on removing the bold portion. what could i do about that
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Need Help for Adding Three new columns in existing file from fatching data from file

not required this time (36 Replies)
Discussion started by: Sandeep_Malik
36 Replies

2. Shell Programming and Scripting

Need help in sed command (adding a blank line btw each block generated by pattern)

Hello friends, I have a C source code containing sql statements. I use the following sed command to print all the sql blocks in the source code.... sed -n "/exec sql/,/;/p" Sample.cpp The above sed command will print the sql blocks based on the pattern "exec sql" & ";"... (2 Replies)
Discussion started by: frozensmilz
2 Replies

3. Shell Programming and Scripting

Need help in sed: adding a line after each search block

Hi friends, I have written script that will search & display the block of sql statement. Since there are many blocks of sql statement i am finding it difficult to distinguish between them. The below is the sed command & its result exec sql abc abc abc... (2 Replies)
Discussion started by: frozensmilz
2 Replies

4. Shell Programming and Scripting

finding a block in a file and replace with another file block.

(1) Yes but how is this block different from the other 24? You will need this information in order to identify and replace this block correctly (out of the 25). Ans: The 1st line and last line of this block are unique from other block. The 1st line is “rem Subset Rows (&&tempName.*) and The... (1 Reply)
Discussion started by: Zaheer.mic
1 Replies

5. Shell Programming and Scripting

Adding new lines to a file + adding suffix to a pattern

I need some help with adding lines to file and substitute a pattern. Ok I have a file: #cat names.txt name: John Doe stationed: 1 name: Michael Sweets stationed: 41 . . . And would like to change it to: name: John Doe employed permanently stationed: 1-office (7 Replies)
Discussion started by: hemo21
7 Replies

6. Shell Programming and Scripting

editing line in text file adding number to value in file

I have a text file that has data like: Data "12345#22" Fred ID 12345 Age 45 Wilma Dino Data "123#22" Tarzan ID 123 Age 33 Jane I need to figure out a way of adding 1,000,000 to the specific lines (always same format) in the file, so it becomes: Data "1012345#22" Fred ID... (16 Replies)
Discussion started by: say170
16 Replies

7. Shell Programming and Scripting

Adding content of two file in a single file column wise

Hi, I am trying to get the file in particular pattern using shell script. I have to add one column to some other file. For example consider two file as below. File1: name1 name2 name3 File2: Add1 age1 Add2 age2 Add3 age3 I want this two file in a single file format something like... (3 Replies)
Discussion started by: diehard
3 Replies

8. UNIX for Advanced & Expert Users

Move a block of lines to file if string found in the block.

I have a "main" file which has blocks of data for each user defined by tags BEGIN and END. BEGIN ID_NUM:24879 USER:abc123 HOW:47M CMD1:xyz1 CMD2:arp2 STATE:active PROCESS:id60 END BEGIN ID_NUM:24880 USER:def123 HOW:4M CMD1:xyz1 CMD2:xyz2 STATE:running PROCESS:id64 END (7 Replies)
Discussion started by: grep_me
7 Replies

9. Shell Programming and Scripting

Printing a block of lines from a file, if that block does not contain two patterns using sed

I want to process a file block by block using sed, and if that block does not contain two patterns, then that complete block has to be printed. See below for the example data. ................................server 1............................... running process 1 running... (8 Replies)
Discussion started by: Kesavan
8 Replies

10. UNIX for Beginners Questions & Answers

Adding to an array in an external file, and adding elements to it.

I have an array in an external file, "array.txt", which contains: char *testarray={"Zero", "One", "Two", "Three", "Four", "Five", "Six", "Seven", "Eight", "Nine"};I want to be able to add an element to this array, and have that element display, whenever I call it, without having to recompile... (29 Replies)
Discussion started by: ignatius
29 Replies
allocb_tmpl(9F) 					   Kernel Functions for Drivers 					   allocb_tmpl(9F)

NAME
allocb_tmpl - allocate a message block using a template SYNOPSIS
#include <sys/stream.h> mblk_t *allocb_tmpl(size_t size, const mblk_t *tmpl); INTERFACE LEVEL
Solaris DDI specific (Solaris DDI) PARAMETERS
size The number of bytes in the message block. tmpl The template message block. DESCRIPTION
The allocb_tmpl() function tries to allocate a STREAMS message block using allocb(9F). If the allocation is successful, the db_type field in the the data block structure (dblk_t, see datab(9S)), as well as some implementation-private data, are copied from the dblk_t associated with tmpl. allocb_tmpl() should be used when a new STREAMS message block is allocated. This block is then used to contain data derived from another STREAMS message block. The original message is used as the tmpl argument. RETURN VALUES
Upon success, allocb_tmpl() returns a pointer to the allocated message block of the same type as tmpl. On failure, allocb_tmpl() returns a NULL pointer. CONTEXT
allocb_tmpl() can be called from user or interrupt context. SEE ALSO
allocb(9F), datab(9S), msgb(9S) Writing Device Drivers STREAMS Programming Guide SunOS 5.10 18 Feb 2003 allocb_tmpl(9F)
All times are GMT -4. The time now is 05:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy