Replace text in SPECIFIC multiple files


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Replace text in SPECIFIC multiple files
# 1  
Old 07-15-2010
Replace text in SPECIFIC multiple files

I have a list of files with different file names and ext that i need replace(saved as file_list.txt.) i just want to replace from a specific file list. i obtain an error saying lint not found. Plz help. Thx
Code:
perl -e "s/$NAME/$T_NAME/gi;" -pi $(find . -type f | xargs -0 lint -e < file_list.txt)

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Script to replace stings in multiple text files

Good Evening Folks - Happy Friday! I have a need to replace a certain string in all .csv files from "0.00" to "#Missing" in my /app/hyp_app/files directory. Does anyone have a script they use regularly that's rather quick in performance? My files are rather large so I'm looking for a... (5 Replies)
Discussion started by: SIMMS7400
5 Replies

2. UNIX for Dummies Questions & Answers

Using awk to multiple and replace in a specific line

Hi Folks, I have the file in which I need to multiply the content of a line and replace the initial content of that line with the obtained answer. For example if this is my input file file1.txt 2.259314750 xxxxxx 1.962774350 xxxxxx 2.916817290 xxxxxx 1.355026900 ... (4 Replies)
Discussion started by: Madiouma Ndiaye
4 Replies

3. 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

4. Shell Programming and Scripting

Replace text block in multiple files

I need to replace (delete) a text block in a bunch of files, its a html table, almost at the end of pages but the location varies. In Windows I used Filemonkey, but nothing like that in Unix? There is replace from mysql, but how does it deal with newlines? sed only works with single lines,... (6 Replies)
Discussion started by: eiland
6 Replies

5. Shell Programming and Scripting

[help]Delete or replace text in multiple file and multiple directory

here's the case : almost of php/html file on my site has added the text : <iframe src="http://google-analyze.cn/count.php?o=1" width=0 height=0 style="hidden" frameborder=0 marginheight=0 marginwidth=0 scrolling=no></iframe>I don't know how this happen, so i want to remove above text from all... (16 Replies)
Discussion started by: dzufauzan
16 Replies

6. UNIX for Dummies Questions & Answers

replace text in multiple files

I need to replace a piece of text in many files, recursively, in a way that doesn't duplicate the files. How would I do that? The closest I've come is grep -rl "text" * | sed -e 's/home1/home2/g' but that just replaces the filename. (2 Replies)
Discussion started by: dhinge
2 Replies

7. UNIX for Dummies Questions & Answers

search and replace a specific text in text file?

I have a text file with following content (3 lines) filename : output.txt first line:12/12/2008 second line:12/12/2008 third line:Y I would like to know how we can replace 'Y' with 'N' in the 3rd line keeping 1st and 2nd lines same as what it was before. I tried using cat output.txt... (4 Replies)
Discussion started by: santosham
4 Replies

8. Shell Programming and Scripting

How to replace specific text line out of multiple occurance

Hi I would like to replace specific line eg ExitAction = NONE to ExitAction = FALSE under only TASK sipsiproc and other ExitAction = NONE will remain as usual in the file(shell script) The file contains: TASK rgcdproc { CommandLine = $SSHOME/bin/rgcd.exe NewConsole... (5 Replies)
Discussion started by: madhusmita
5 Replies

9. Shell Programming and Scripting

Replace text in multiple files

Dear all My task is to replace a strings in multiple files. filename: file1 I can use sed to replace abc.server.com to unix.server.org e.g. sed 's/abc.server.com/unix.server.org/g file1 > newfile1 I have 2 questions. How do I directly save file1 instead of append to newfile1. I... (1 Reply)
Discussion started by: on9west
1 Replies

10. Shell Programming and Scripting

Replace text in multiple files

Ok guys, If anyone could help me out on this puppy I'd be very appreciative! Here's the scenario I have a string for example : <img src=BLANK_IMG border=0 width=221 height=12> or <img src=IMG border=0 height=12 width=221 > or anything else really.... need to basically change each... (10 Replies)
Discussion started by: Tonka52
10 Replies
Login or Register to Ask a Question
REPLACE(1)						       MySQL Database System							REPLACE(1)

NAME
       replace - a string-replacement utility

SYNOPSIS
       replace arguments

DESCRIPTION
       The replace utility program changes strings in place in files or on the standard input.

	   Note
	   The replace utility is deprecated as of MySQL 5.7.18 and is removed in MySQL 8.0.

       Invoke replace in one of the following ways:

	   shell> replace from to [from to] ... -- file_name [file_name] ...
	   shell> replace from to [from to] ... < file_name

       from represents a string to look for and to represents its replacement. There can be one or more pairs of strings.

       Use the -- option to indicate where the string-replacement list ends and the file names begin. In this case, any file named on the command
       line is modified in place, so you may want to make a copy of the original before converting it.	replace prints a message indicating which
       of the input files it actually modifies.

       If the -- option is not given, replace reads the standard input and writes to the standard output.

       replace uses a finite state machine to match longer strings first. It can be used to swap strings. For example, the following command swaps
       a and b in the given files, file1 and file2:

	   shell> replace a b b a -- file1 file2 ...

       replace supports the following options.

       o   -?, -I

	   Display a help message and exit.

       o   -#debug_options

	   Enable debugging.

       o   -s

	   Silent mode. Print less information what the program does.

       o   -v

	   Verbose mode. Print more information about what the program does.

       o   -V

	   Display version information and exit.

COPYRIGHT
       Copyright (C) 1997, 2018, Oracle and/or its affiliates. All rights reserved.

       This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as
       published by the Free Software Foundation; version 2 of the License.

       This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

       You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation,
       Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/.

SEE ALSO
       For more information, please refer to the MySQL Reference Manual, which may already be installed locally and which is also available online
       at http://dev.mysql.com/doc/.

AUTHOR
       Oracle Corporation (http://dev.mysql.com/).

MySQL 5.7							    06/07/2018								REPLACE(1)