Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Changing text in multiple files, but with different text for each file Post 302663885 by elixir_sinari on Thursday 28th of June 2012 03:04:09 PM
Old 06-28-2012
Code:
for i in bob.txt joe.txt john.txt tom.txt zach.txt
do
 sed '1s/name = xxx/name = '"${i%.*}"'/' $i > $$
 mv $$ $i
done

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

grep multiple text files in folder into 1 text file?

How do I use the grep command to take mutiple text files in a folder and make one huge text file out of them. I'm using Mac OS X and can not find a text tool that does it so I figured I'd resort to the BSD Unix CLI for a solution... there are 5,300 files that I want to write to one huge file so... (7 Replies)
Discussion started by: coppertone
7 Replies

2. Shell Programming and Scripting

read list of filenames from text file and remove these files in multiple directories

I have a large list of filenames from an Excel sheet, which I then translate into a simple text file. I'd like to use this list, which contains various file extensions , to archive these files and then remove them recursively through multiple directories and subdirectories. So far, it looks like... (5 Replies)
Discussion started by: fxvisions
5 Replies

3. Shell Programming and Scripting

Create multiple text file from a single text file on AIX

Hi I need to create multiple text files from onc text file on AIX. The data of text files is as below: ********************************************** ********************************************** DBVERIFY: Release 10.2.0.4.0 - Production on Tue Nov 10 13:45:42 2009 Copyright (c) 1982,... (11 Replies)
Discussion started by: lodhi1978
11 Replies

4. Shell Programming and Scripting

[bash help]Adding multiple lines of text into a specific spot into a text file

I am attempting to insert multiple lines of text into a specific place in a text file based on the lines above or below it. For example, Here is a portion of a zone file. IN NS ns1.domain.tld. IN NS ns2.domain.tld. IN ... (2 Replies)
Discussion started by: cdn_humbucker
2 Replies

5. UNIX for Dummies Questions & Answers

How to grep multiple lines from a text file using another text file?

I would like to use grep to select multiple lines from a text file using a single-column text file. Basically I want to only select lines from the first text file where the second column of the first text file matches the second text file. How do I go about doing that? Thanks! (5 Replies)
Discussion started by: evelibertine
5 Replies

6. UNIX for Dummies Questions & Answers

Splitting up a text file into multiple files by columns

Hi, I have a space delimited text file with multiple columns 102 columns. I want to break it up into 100 files labelled 1.txt through 100.txt (n.txt). Each text file will contain the first two columns and in addition the nth column (that corresponds to n.txt). The third file will contain the... (1 Reply)
Discussion started by: evelibertine
1 Replies

7. Shell Programming and Scripting

Merge the multiple text files into one file

Hi All, I am trying to merge all the text files into one file using below snippet cat /home/Temp/Test/Log/*.txt >> all.txt But it seems it is not working. I have multiple files like Output_ServerName1.txt, Output_ServreName2.txt I want to merge each file into one single file and... (6 Replies)
Discussion started by: sharsour
6 Replies

8. Shell Programming and Scripting

Split a text file into multiple text files?

I have a text file with entries like 1186 5556 90844 7873 7722 12 7890.6 78.52 6679 3455 9867 1127 5642 ..N so many records like this. I want to split this file into multiple files like cluster1.txt, cluster2.txt, cluster3.txt, ..... clusterN.txt. (4 Replies)
Discussion started by: sammy777
4 Replies

9. UNIX for Dummies Questions & Answers

Pdftotext from multiple pdf files to a single text file

I have a directory having a number of pdf files. I want to convert all the files to text, stored in a single text file The following creates multiple text files ls *.pdf | xargs -n1 pdftotext (1 Reply)
Discussion started by: kristinu
1 Replies

10. Shell Programming and Scripting

Copying a file to multiple other files using a text file as input

Hello, I have a file called COMPLIST as follows that contains 4 digit numbers.0002 0003 0010 0013 0015 0016 0022 0023 0024 0025 0027 0030 0031 0032 0033 0035 0038 0041 (3 Replies)
Discussion started by: sph90457
3 Replies
patch_active_text(5)						File Formats Manual					      patch_active_text(5)

NAME
patch_active_text - dynamically enable or disable running executable text to be modified via mprotect() VALUES
Fail Safe Default semantics is enabled Allowed values or DESCRIPTION
This tunable allows write access to text of a running process such that the active text can be modified. When this tunable is enabled, can be used with a special flag, to modify the text of a running executable. By default, does not work on text of a process. Enabling the tunable allows to work on text segments of a process. Making text writable will create a private copy of the text to the process using this feature. Once with special flag allows running text to be modified, further invocations of on text of a process with other prot flags are also allowed. For must always be used with (see mprotect(2)). must always be used on text address range. After the first invocation of further mprotect(2) calls will work on text segments of process with any other prot flags; in other words, will work on text with or any combinations of the above. The only requirement is that both these flags must be invoked first. Who Is Expected to Change This Tunable? System administrators who wish to change the default behavior. Restrictions on Changing Changes to this tunable take effect immediately. When Should the Tunable Be Turned Off? If an application expects to fail on text segments, the tunable should be turned off. What Are the Side Effects of Turning the Tunable Off? Applications will no longer be able to use on text of a process. When Should the Tunable Be Turned On? If an application wants its text segment to be writable and also wants to be able to work on text of processes, this tunable must be turned on. Making text writable will create a private copy of the text to the process using this feature. What Are the Side Effects of Turning the Tunable On? Memory consumption in the system will increase. This is because with the process will create a private copy of the shared text on first invocation. It should also be noted that large page benefits on text segments will be lost. What Other Tunables Should Be Changed at the Same Time? None. WARNINGS
All HP-UX kernel tunable parameters are release specific. This parameter may be removed or have its meaning changed in future releases of HP-UX. Installation of optional kernel software, from HP or other vendors, may cause changes to tunable parameter values. After installation, some tunable parameters may no longer be at the default or recommended values. For information about the effects of installation on tun- able values, consult the documentation for the kernel software being installed. For information about optional kernel software that was factory installed on your system, see at AUTHOR
was developed by HP. SEE ALSO
mprotect(2), copy_on_write(5) Tunable Kernel Parameters patch_active_text(5)
All times are GMT -4. The time now is 07:59 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy