Sponsored Content
Top Forums Shell Programming and Scripting Append text from one file to another based on a search from the end of a document Post 302465026 by Scrutinizer on Thursday 21st of October 2010 01:25:35 PM
Old 10-21-2010
Quote:
Originally Posted by marcozd
Thanks for your efforts but the scritp you suggested wasn't working - it didn't grab all of the text and the resulting output didn't have the "$END" in it.

Again, many thanks for your time and effort though.Smilie
Hi, his was actually by design, as I figured you did not want them in ("The text that needs to be appended is sandwiched between...").

Thanks for the feedback.

Last edited by Scrutinizer; 10-21-2010 at 02:37 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Append a field to the end of each line of a file based on searching another file.

Hi All, I have two comma separated value(CSV) files, say FileA and FileB. The contents looks like that shown below. FileA EmpNo,Name,Age,Sex, 1000,ABC,23,M, 1001,DES,24,F, ... (2 Replies)
Discussion started by: ultimate
2 Replies

2. Shell Programming and Scripting

Append text at end of the first line in a file

Hi I need to append some text @ end of the first line in a file. like myfile.txt list = a,b,c list.a=some.. I give the arg "d" . now it append at end of first line list=a,b,c,d list.a=some... Please help me out this (7 Replies)
Discussion started by: catgovind
7 Replies

3. Shell Programming and Scripting

search directory-find files-append at end of line

Hi, I have a command "get_data" with some parameters in few *.text files of a directory. I want to first find those files that contain this command and then append the following parameter to the end of the command. example of an entry in the file :- get_data -x -m50 /etc/web/getid this... (1 Reply)
Discussion started by: PrasannaKS
1 Replies

4. Shell Programming and Scripting

append some text message at the end of the file

Hi All, Please tell me how to append some text message at the end of the file. "File too large to view" example: xyz.log contains hhhhhhhhhhh hhhhhhjjjjjjjjj jjjjjjjjjjjjjjjjjjjjjj "File too large to view" Please advice (3 Replies)
Discussion started by: rajeshorpu
3 Replies

5. UNIX for Dummies Questions & Answers

How can I append a text at end of file after displaying the file

I have a file "sample.txt" with the content as below: Hi This is a Sample Text. I need a single command using cat which serve the following purpose. 1.display the contents of sample.txt 2.append some text to it 3. and then exit But, all should be served by a sinle command.:confused: (1 Reply)
Discussion started by: g.ashok
1 Replies

6. Shell Programming and Scripting

Append the text file with comma at the end of every word

Hi folks, Using shell, I am trying the append comma to every line of text. the requirement is like, I have to open the txt file in unix and read line by line and should add comma at the end of every word to make it single line txt file ------- abc@gmail.com bcd@gmail.com... (7 Replies)
Discussion started by: giridhar276
7 Replies

7. Shell Programming and Scripting

Search for a string, then append character to end of that line only

I have 2 files that I am working with $ cat file1 server1 server3 server5 server6 server8 $ cat file2 server1;Solaris; server2; SLES; server3;Linux; server4; Solaris; server5;SLES; server6;SLES; server7;Solaris; server8;Linux; (1 Reply)
Discussion started by: snoman1
1 Replies

8. Shell Programming and Scripting

To append new data at the end of each line based on substring of last column

Hi guys, I need to append new data at the end of each line of the files. This new data is based on substring (3rd fields) of last column. Input file xxx.csv: U1234|1-5X|orange|1-5X|Act|1-5X|0.1 /sac/orange 12345 0 U5678|1-7X|grape|1-7X|Act|1-7X|0.1 /sac/grape 5678 0... (5 Replies)
Discussion started by: null7
5 Replies

9. Shell Programming and Scripting

sed - go to file and search a part and set at the end text

Hello, i hope the titel is okay. I want to edit a line in /etc/arno-iptables-firewall/firewall.conf So the Line can contains: OPEN_TCP="436, 25, 80, 110, 143, 443, 465, 587, 993, 995, 21, 20" i want to search in this line: OPEN_TCP="*, *, 80, *, *, 443, *, *, *, *" and i want to... (11 Replies)
Discussion started by: tJAdASwIRDESSEI
11 Replies

10. UNIX for Beginners Questions & Answers

UNIX script to append multiple text files into one file based on pattern present in filaname

Hi All-I am new to Unix , I need to write a script. Can someone help me with a requirement where I have list of files in a directory, I want to Merge the files if a pattern of string matches in filenames? AAAL_555A_ORANGE1_F190404.TXT AAAL_555A_ORANGE2_F190404.TXT AAAL_555A_ORANGE3_F190404.TXT... (6 Replies)
Discussion started by: Shankar455
6 Replies
LONDISTE(5)															       LONDISTE(5)

NAME
londiste - PostgreSQL replication engine written in python SYNOPSIS
[londiste] job_name = asd DESCRIPTION
The londiste configuration file follow the famous .INI syntax. It contains only one section named londiste. Most defaults values are reasonable ones. That means you can only edit provider_db, subscriber_db and pgq_queue_name and be done with londiste configuration. OPTIONS
You can configure the following options into the londiste section. job_name Each Skytools daemon process must have a unique job_name. Londiste uses it also as consumer name when subscribing to queue. provider_db Provider database connection string (DSN). subscriber_db Subscriber database connection string (DSN). pgq_queue_name Name of the queue to read from. Several subscribers can read from same queue. logfile Where to log londiste activity. pidfile Where to store the pid of the main londiste process, the replay one. lock_timeout Few operations take lock on provider (provider add/remove, compare, repair). This parameter specifies timeout in seconds (float) how long a lock can be held. New in version 2.1.8. Default: 10 loop_delay How often to poll events from provider. In seconds (float). Default: 1. pgq_lazy_fetch How many events to fetch at a time when processing a batch. Useful when you know a single transaction (maintenance UPDATE command, e.g.) will produce a lot of events in a single batch. When lazily fetching, a cursor is used so as to still process a single batch in a single transaction. Default: 0, always fetch all events of the batch, not using a cursor. log_count Number of log files to keep. Default: 3 log_size Max size for one log file. File is rotated if max size is reached. Default: 10485760 (10M) use_skylog If set, search for [./skylog.ini, ~/.skylog.ini, /etc/skylog.ini]. If found then the file is used as config file for Pythons logging module. It allows setting up fully customizable logging setup. Default: 0 EXAMPLE
[londiste] job_name = test_to_subcriber provider_db = dbname=provider port=6000 host=127.0.0.1 subscriber_db = dbname=subscriber port=6000 host=127.0.0.1 # it will be used as sql ident so no dots/spaces pgq_queue_name = londiste.replika logfile = /tmp/%(job_name)s.log pidfile = /tmp/%(job_name)s.pid SEE ALSO
londiste(1) 03/13/2012 LONDISTE(5)
All times are GMT -4. The time now is 05:19 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy