10 More Discussions You Might Find Interesting
1. Linux
Hi I have a CommonTemplateStop.template file . Inside the file i need to replace the variables DepName and CompInsName with the values(Trade and TradeIns) specified in the script. I have written the below .sh script in linux server which will read the .template file and has to replace the 2... (8 Replies)
Discussion started by: samrat dutta
8 Replies
2. Shell Programming and Scripting
Hi Bigshots,
I have a pattern file with two columns. I have another data file. If column 1 in the pattern file appears as the 4th column in the data file, I need to replace it (4th column of data file) with column 2 of the pattern file. If the pattern is found in any other column, it should not... (6 Replies)
Discussion started by: ss112233
6 Replies
3. Shell Programming and Scripting
I have a environment property file which contains:
Input file:
value1 = url1
value2 = url2
value3 = url3 and so on.
I need to search all *.xml files under directory for value1 and replace it with url1.
Same thing I have to do for all values mentioned in input file. I need script in unix bash... (7 Replies)
Discussion started by: Shamkamde
7 Replies
4. Shell Programming and Scripting
Hello,
I have hundreds of files in which I need to change email address. Here is what I am trying to do:
1. All text files are in a directory "a"
2. In the text file, I want to replace email address for preparer. All these lines start with {{PreparerEmail and end with }}. The email... (3 Replies)
Discussion started by: cartrider
3 Replies
5. Shell Programming and Scripting
I have a list of files all over a file system e.g.
/home/1/foo/bar.x
/www/sites/moose/foo.txtI'm looking for strings in these files and want to replace each occurrence with a replacement string, e.g.
if I find: '#@!^\&@ in any of the files I want to replace it with: 655#@11, etc.
There... (2 Replies)
Discussion started by: spacegoose
2 Replies
6. Shell Programming and Scripting
Hi all.
I have the following command that is successfully searching for any one of the strings on all lines of a file and replacing it with the instructed value.
cat inputFile | awk '{gsub(/aaa|bbb|ccc|ddd/,"1234")}1' > outputFile
This does in fact replace any occurrence of aaa, bbb,... (2 Replies)
Discussion started by: dazhoop
2 Replies
7. Shell Programming and Scripting
I have a pipe delimited file with 27 fields. Each record has 26 fields. I need to search for the 25,26,27 fields and replace "," with nothing.
How can I acheive this. Sed is more preferred.
e.g
data row
o/p (5 Replies)
Discussion started by: dsravan
5 Replies
8. Shell Programming and Scripting
Hi,
I have a folder which contains multiple config.xml files and one input file, Please see the below format.
Config Files format looks like :-
Code:
<application name="SAMPLE-ARCHIVE">
<NVPairs name="Global Variables">
<NameValuePair>
... (0 Replies)
Discussion started by: haiksuresh
0 Replies
9. Shell Programming and Scripting
I have a rather complicated search and replace I need to do among several dozen files and over a hundred occurrences. My site is written in PHP and throughout the old code, you will find things like
die("Operation Aborted due to.....");
For my new design skins for the site, I need to get... (2 Replies)
Discussion started by: UCCCC
2 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I have different files and I want to automatically change the values of the defined variables. i want to get rid of editing all the files and make it a little bit faster. my problem is like this.
1. i will input all the new values.
2. substitute this values into the values inside the... (1 Reply)
Discussion started by: tungaw2004
1 Replies