Hi All,
I need an enlightenment.
I have a file that some field need to be replaced.
sample : fileA.txt
abc,4#cik#221,text
abc,4#kus#343,text
...
...
what I need to replace is the "cik" and "kus" field to their fix value.
I have another file : fileB.txt that has value of "cik and... (1 Reply)
Hi -
I am looking for a replacing a string in a in multiple *.sql files in directory with a new string without using a temporary file
Normally I can use sed command as below
for W in ls `FILE*.sql`
do
sed 's/OLD/NEW/g' $W > TEMPFILE.dat
mv TEMPFILE.dat $W
done
But Here in my... (9 Replies)
I have a file in which I want to do multiple find and replace of strings. For a single replace I can implement:
sed -i 's/old/new/' <input_file>
I have a second file that contains the old and the new values like the arbitrary example below:
old new
xyz pqr
ab 756
rst pqr... (3 Replies)
Hi Everyone,
I am new to this forum and new to sed/awk programming too !!
I need to find particular string in file1(text file) and replace it with a value from another text file(file2) the file2 has only one line and the value to be replaced with is in the second column.
file 1:
(assert (=... (21 Replies)
Hi All,
I am very new to UNIX and I have tried this for a longtime now and unable to crack it....
There is a file that is continuously updating. I need to search for the string and find the date @ which it updated every day.....
eg:
String is "work started"
The log entry is as below:
... (1 Reply)
here is what i want to achieve... consider a file contains below contents. the file size is large about 60mb
cat dump.sql
INSERT INTO `table1` (`id`, `action`, `date`, `descrip`, `lastModified`) VALUES (1,'Change','2011-05-05 00:00:00','Account Updated','2012-02-10... (10 Replies)
Dear all,
I need your help, I have file like this:
file1:23456
01910964830098775635
34567
01942809546554654323
67589
26546854368698023653
09778
58716868568576876878
08675
86178546154065406546
08573
54165843543054354305
.
.file2:
23456 25
34567 26
67589 27 (2 Replies)
Hello Forum.
I have a file called abc.sed with the following commands;
s/1/one/g
s/2/two/g
...
I also have a second file called abc.dat and would like to substitute all occurrences of "1 with one", "2 with two", etc and create a new file called abc_new.dat
sed -f abc.sed abc.dat >... (10 Replies)
Dear all,
I want to find all the "," in my text file and then replace the commas to a tab. I found a script online but I don't know how to modify the script for my case. Any one can help? Thank you.
@echo off &setlocal
set "search=%1"
set "replace=%2"
set "textfile=Input.txt"
set... (2 Replies)
Discussion started by: forevertl
2 Replies
LEARN ABOUT MOJAVE
replace
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)