Sponsored Content
Top Forums Shell Programming and Scripting Search ad replace using begin and end of the file Post 302927954 by rnary on Sunday 7th of December 2014 09:47:28 PM
Old 12-07-2014
Hello Don

My requirement is not to distrub secondary content of the file1 , I just want to replace only primary content.


Thank you
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How do you search and replace a text with markerA that end with markerB

Hi all, How do you replace all lines that begin with markerA and end with markerB? Ex: I have a file with a list of lines. /sbin/fsck -> $(SEC_CRIT) ; /sbin/fsck.ext2 -> $(SEC_CRIT) ; How can I replace all "->$....;" with a blank space... (1 Reply)
Discussion started by: drone
1 Replies

2. Shell Programming and Scripting

BEGIN END questions

Why would you need to use this in a script? Why can't you just use print to print out what you want printed in the begining and print for what you want at the end. So this: nawk 'BEGIN {print "this is the first line"} {print $1 $2 $3} {print $5 $6} END {print "this is the last line"}' ... (2 Replies)
Discussion started by: llsmr777
2 Replies

3. Shell Programming and Scripting

begin end detection

Hi all, i am new to scripting. i need to write a code to detect begin and end of word that either begins or ends with t,th,d,dh,s,sh i have a set of words in a file containg one word per line. let the filename be aaa.txt. i have an another file bbb.txt which has two lines, just specifying the... (7 Replies)
Discussion started by: blkanth
7 Replies

4. Shell Programming and Scripting

Use of Begin IF ,END IF END not working in the sql script

Hi I have written a script .The script runs properly if i write sql queries .But if i use PLSQL commands of BEGIN if end if , end ,then on running the script the comamds are getting printed on the prompt . Ex :temp.sql After connecting to the databse at the sql prompt i type... (1 Reply)
Discussion started by: isha_1
1 Replies

5. UNIX for Dummies Questions & Answers

Dump to another file for a begin and end Pattern

Hi All , I am newbie to linux shell scripting , below are the contents of my log file , i want the lines between a begin pattern and a end pattern for an instance , my begin Pattern is "Transaction Begins for Usr" and end pattern is "Transaction Ends for Usr" into another file Sample file... (1 Reply)
Discussion started by: SARAVANANE
1 Replies

6. Programming

search a file between two begin and end strings in c

Can any one help me out with following problem... I want to search in a file which has two strings repeat each time(like start and end) i want to search between these two string in C programming. please help me with the solution. thanks in advance. (8 Replies)
Discussion started by: uday.sena.m
8 Replies

7. Shell Programming and Scripting

Get the sum of values in between begin and end in the file

Hi All, test file Begin Script Run at Thu Mar 14 09:24:16 PDT 2013 tst_accounts: ws zip: WS_out_20130313.tar.gz dat: test_20130313.dat count: 63574 loaded: xx pre-merge: xx post-merge: xx timestamp: Thu Mar 14 09:30:42 PDT 2013 tst_accounts: ws zip: WS_out_20130313.tar.gz dat: s_20130313.dat... (6 Replies)
Discussion started by: bmk
6 Replies

8. Shell Programming and Scripting

Search for a Keyword in file and replace another keyword or add at the end of line

Hi I want to implement something like this: if( keyword1 exists) then check if(keyword2 exists in the same line) then replace keyword 2 with New_Keyword else Add New_Keyword at the end of line end if eg: Check for Keyword JUNGLE and add/replace... (7 Replies)
Discussion started by: dashing201
7 Replies

9. UNIX for Beginners Questions & Answers

Grep/awk using a begin search pattern and end search pattern

I have this fileA TEST FILE ABC this file contains ABC; TEST FILE DGHT this file contains DGHT; TEST FILE 123 this file contains ABC, this file contains DEF, this file contains XYZ, this file contains KLM ; I want to have a fileZ that has only (begin search pattern for will be... (2 Replies)
Discussion started by: vbabz
2 Replies

10. UNIX for Beginners Questions & Answers

File write begin/end, recording time

Hello all, How can I find out the start and end of the writing file in the directory or recording time for writing file? I have a directory where small ~ 1*MB temporary files are written. After the end of the record, they are retrieved and erased. I can only find out that the files are... (4 Replies)
Discussion started by: mrAibo
4 Replies
ZMQ_MSG_COPY(3) 						    0MQ Manual							   ZMQ_MSG_COPY(3)

NAME
zmq_msg_copy - copy content of a message to another message SYNOPSIS
int zmq_msg_copy (zmq_msg_t *dest, zmq_msg_t *src); DESCRIPTION
The zmq_msg_copy() function shall copy the message object referenced by src to the message object referenced by dest. The original content of dest, if any, shall be released. Caution The implementation may choose not to physically copy the message content, rather to share the underlying buffer between src and dest. Avoid modifying message content after a message has been copied with zmq_msg_copy(), doing so can result in undefined behaviour. If what you need is an actual hard copy, allocate a new message using zmq_msg_init_size() and copy the message content using memcpy(). Caution Never access zmq_msg_t members directly, instead always use the zmq_msg family of functions. RETURN VALUE
The zmq_msg_copy() function shall return zero if successful. Otherwise it shall return -1 and set errno to one of the values defined below. ERRORS
EFAULT Invalid message. SEE ALSO
zmq_msg_move(3) zmq_msg_init(3) zmq_msg_init_size(3) zmq_msg_init_data(3) zmq_msg_close(3) zmq(7) AUTHORS
This manual page was written by the 0MQ community. 0MQ 2.2.0 04/04/2012 ZMQ_MSG_COPY(3)
All times are GMT -4. The time now is 07:49 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy