10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi
I have a large txt file on my AIX server and I need to replace some text using two other files. So filename1 has about 500 lines similar to:
txtcode SYStem100
I have the string I want to change in string2 and the new stringname in string3. Does anyone know a way of doing this? I have... (1 Reply)
Discussion started by: Grueben
1 Replies
2. Shell Programming and Scripting
Hi I need help with writing a script to change a string in a file.
The script needs to read an input list (list.txt) file line by line searching for that string in a text.file. Once the string is found the last few words in the string should be replaced.
eg list.txt will contain
hello my... (6 Replies)
Discussion started by: sudobash
6 Replies
3. Shell Programming and Scripting
Hello,
I have been working on script in which search and replace the multiple pattern.
1. update_params.sh read the multiple pattern from input file ParamMapping.txt(old_entry|New_entry) and passing this values one by one to change_text.sh
2. change_text.sh read... (0 Replies)
Discussion started by: ketanraut
0 Replies
4. 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
5. Shell Programming and Scripting
Hi,
I was having the following issue
cat input
hello1, my name is unix.com. I am awesome. Hope you know this, hello2!
cat hello1.txt
Hi Friends
Hi Folks
Hi Well-Wishers
cat hello2.txt
Honey
Sweety
Darling
Required Output (8 Replies)
Discussion started by: jacobs.smith
8 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
Hi folks,
I need help to finish this script please.
see below:
I have an input file with all the IP address to names formated like so in a txt file
addnsr1pri 166.7.3.105
addnsr1sec 166.2.100.22
addnsr2pri 166.2.220.121
addnsr2sec 166.3.68.45... (12 Replies)
Discussion started by: richsark
12 Replies
8. Shell Programming and Scripting
Hi,
I have a set of strings in filea.
I want to search string xyz in fileb and replace next line in file b with the content from filea.
#cat filea
abc
def
ghi
#cat fileb
asdkjdslka
sajljskdjoi
xyzjjjjkko
aaaaaaaa
bbbbbbbb
cccccccc
xyzsdsajd
dddddddd
eeeeeeee (2 Replies)
Discussion started by: anilvk
2 Replies
9. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
(o) Checkout an auto part: should prompt the user for the name of the auto part
and borrower's name:
Name:... (2 Replies)
Discussion started by: SlapnutsGT
2 Replies
10. UNIX for Dummies Questions & Answers
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