Subsitute string in file 1 by line n of file 2


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Subsitute string in file 1 by line n of file 2
# 15  
Old 06-24-2018
Thanks a lot RavinderSingh13, everything works as expected!

Supernono06
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

If the 1th column of file f1 and file f2 is the same, then export those line with maximum string of

please help to write a awk command-line programs to achieve the following functions: Thank in advance. Requeset Description: compare two files f1 and f2, export to file f3: 1 Delete duplicate rows of in file f1 and file f2 2 If the 1th column of file f1 and file f2 is the same, then export... (1 Reply)
Discussion started by: weichanghe2000
1 Replies

2. Shell Programming and Scripting

Replace line in file with line in another file based on matching string

HI Can any one guide me how to achieve this task. I have 2 files env.txt #Configuration.Properties values identity_server_url = http://identity.test-hit.com:9783/identity/service/user/register randon_password_length = 6 attachment_file_path = /pass/temp/attachments/... (1 Reply)
Discussion started by: nikilbr86
1 Replies

3. Shell Programming and Scripting

Replace and add line in file with line in another file based on matching string

Hi, I want to achieve something similar to what described in another post: The difference is I want to add the line if the pattern is not found. File 1: A123, valueA, valueB B234, valueA, valueB C345, valueA, valueB D456, valueA, valueB E567, valueA, valueB F678, valueA, valueB ... (11 Replies)
Discussion started by: jyu3
11 Replies

4. Shell Programming and Scripting

Compare two string in two separate file and delete some line of file

Hi all i want to write program with shell script that able compare two file content and if one of lines of file have # at the first of string or nothing find same string in one of two file . remove the line in second file that have not the string in first file. for example: file... (2 Replies)
Discussion started by: saleh67
2 Replies

5. Shell Programming and Scripting

Modify a file by another file: add new line and variable after string is found

hello, I have problem with writing/adjusting a shell script. I searched forum and unfortunately couldn't write scipt based on the information I found. I never wtire such so it's hard for me and I do need to modify one script immediately. case looks like: 1. 'file' that needs to be modified... (3 Replies)
Discussion started by: bipbip
3 Replies

6. Shell Programming and Scripting

Replace line in file with line in another file based on matching string

Hi I am not the best scripter in the world and have run into a issue which you might be able to guide me on... I have two files. File1 : A123, valueA, valueB B234, valueA, valueB C345, valueA, valueB D456, valueA, valueB E567, valueA, valueB F678, valueA, valueB File2: C345,... (5 Replies)
Discussion started by: luckycharm
5 Replies

7. Shell Programming and Scripting

replace (sed?) a single line/string in file with multiple lines (string) from another file??

Can someone tell me how I can do this? e.g: Say file1.txt contains: today is monday the 22 of NOVEMBER 2010 and file2.txt contains: the 11th month of How do i replace the word NOVEMBER with (5 Replies)
Discussion started by: tuathan
5 Replies

8. Shell Programming and Scripting

Subsitute from a position till end of line.

Hi, Having a following file's content, lets say: ABC|ANA|LDJ|||||DKD|||||| AJJ|KKDD||KKDK|||||||||||| KKD||KD|||LLLD||||LLD||||| Problem: Need to replace pipes from 8th occurrence of pipe till end. so the result should be: ABC|ANA|LDJ|||||DKD AJJ|KKDD||KKDK|||| ------- ------- ... (12 Replies)
Discussion started by: _Noprofi
12 Replies

9. UNIX for Dummies Questions & Answers

how can search a String in one text file and replace the whole line in another file

i am very new to UNIX plz help me in this scenario i have two text files as below file1.txt name=Rajakumar. Discipline=Electronics and communication. Designation=software Engineer. file2.txt name=Kannan. Discipline=Mechanical. Designation=CADD Design Engineer. ... (6 Replies)
Discussion started by: kkraja
6 Replies
Login or Register to Ask a Question
YAF_RESPONSE_ABSTRACT(3)						 1						  YAF_RESPONSE_ABSTRACT(3)

The Yaf_Response_Abstract class

INTRODUCTION
CLASS SYNOPSIS
Yaf_Response_Abstract Yaf_Response_Abstract Constants o const string$Yaf_Response_Abstract::DEFAULT_BODY"content" Properties o protected$_header o protected$_body o protected$_sendheader Methods o public bool Yaf_Response_Abstract::appendBody (string $content, [string $key]) o public bool Yaf_Response_Abstract::clearBody ([string $key]) o public void Yaf_Response_Abstract::clearHeaders (void ) o private void Yaf_Response_Abstract::__clone (void ) o public Yaf_Response_Abstract::__construct (void ) o public void Yaf_Response_Abstract::__destruct (void ) o public mixed Yaf_Response_Abstract::getBody ([string $key]) o public void Yaf_Response_Abstract::getHeader (void ) o public bool Yaf_Response_Abstract::prependBody (string $content, [string $key]) o public void Yaf_Response_Abstract::response (void ) o protected void Yaf_Response_Abstract::setAllHeaders (void ) o public bool Yaf_Response_Abstract::setBody (string $content, [string $key]) o public void Yaf_Response_Abstract::setHeader (void ) o public void Yaf_Response_Abstract::setRedirect (void ) o private void Yaf_Response_Abstract::__toString (void ) PROPERTIES
o $_header - o $_body - o $_sendheader - PHP Documentation Group YAF_RESPONSE_ABSTRACT(3)