10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Team,
one silly issue. but its not working for me.
I need to find a pattern a file and replace it with the given value in another file.
Here's the code snippet.
Search_String=100
Replace_String=151
cat ${work}/temp_${CSV_File} | sed 's|"${Search_String}"|"${Replace_String}"|g'... (2 Replies)
Discussion started by: kmanivan82
2 Replies
2. Shell Programming and Scripting
Dear All,
I have a file which is having a number my_file.csv
032001031
100509001
203001165
there are many more about 5000.
I have a path in unix
/my_path/my_loc/DEV/RPD10/CPD25/WFM/RK_WFM/OUT/*/
where i will have a file like
CPD25_203001165.pdf
CPD25_100509001.pdf... (4 Replies)
Discussion started by: yadavricky
4 Replies
3. Shell Programming and Scripting
Hi,
I am looking for assistance over shell or perl (without XML twig module) which replace string in XML file under particular branch..example of code file sample..
Exact requirment : Replace "Su saldo es" in below file with "Your balance" but only in XML branch of Text id=98 and Text Id=12... (7 Replies)
Discussion started by: Ashu_099
7 Replies
4. Shell Programming and Scripting
Hi I am very new to shell scripting (and linux in general)...
I am trying to build some script, that will read a person from a csv file, (each person will have an ID, eg id001abc, which will go up one by one a few hundred times) then when find and replace the matching data in an xml file.
... (4 Replies)
Discussion started by: sam.breslin
4 Replies
5. UNIX for Dummies Questions & Answers
After running a command like
grep -ir files2/ *
This will find all the files that contain "files2/" in it.
For example if it finds
files2/dir/today
files2/dir/yesterday
files2/dir/2daysago
Now it may find 100 instances, so is there a quick find and replace command I can use? I... (4 Replies)
Discussion started by: NycUnxer
4 Replies
6. Shell Programming and Scripting
Hi
I am replacing some string occurances with empty string in all files under one directory using
find ./ -name "*.dmp" | xargs perl -pi -e 's/\\N//g' |
its taking too much time for replacing and redirecting to same file in the same directory.
Similarly afterwards i am finding last... (2 Replies)
Discussion started by: dbsurf
2 Replies
7. Shell Programming and Scripting
Hi,
There are some "n" files in a directory which contains comman string.A command to find and replace the string in all the files without looping.
like if i am in a directory :
# find ./ -name ".txt" | xargs sed -e 's/test/tst'
Upto here is performed correctly and i want to... (4 Replies)
Discussion started by: rakshit
4 Replies
8. UNIX for Advanced & Expert Users
Hi
I am trying to find a product code hightlighted in red, and re-insert it at another place on the same file. I shall be grateful if anyone can help me with this. Stuck and have deadline!!:confused:
Original Line: (I can get source data in one of these two formats)
ISD=977155185403901+DIE... (2 Replies)
Discussion started by: gloovy_tb
2 Replies
9. UNIX for Dummies Questions & Answers
I have statement like this
column_id.columnname=="value"
in unix i want to modify above statement to
variable1=="value"
that means i have to replace the string before "==" by string "variable1"
second catch is, in statement instead of "==" you can have any arithmatic comarision... (7 Replies)
Discussion started by: mahabunta
7 Replies
10. UNIX for Dummies Questions & Answers
I have a file that I want to remove all of the periods from. I am using the below to remove quotations and it works fine -I thought I could make it work for the period but it does not. Any help would be appreciated.
works to remove the double quote mark (")
sed -e 's/"//g' input file... (4 Replies)
Discussion started by: valhutch
4 Replies