10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I need one help to replace particular words in file based on if finds another words in that file .
my self is peter@king.
i am staying at north sydney.
we all are peter@king.
How to replace peter to sham if it finds @king in any line of that file.
Please help me... (8 Replies)
Discussion started by: Rajib Podder
2. Shell Programming and Scripting
I am looking for a sed in which I can recognize all of the text in between two indicators and then replace it with a place holder.
For instance, the 1st indicator is a list of words "no|noone|havent" and the 2nd indicator is a list of punctuation ".|,|!".From a sentence such as
"noone... (3 Replies)
Discussion started by: owwow14
3. UNIX for Dummies Questions & Answers
I would like to change my setting in a file to the setting that user input.
For example, by default it is
When user key in "YES", it would be
This code only adds in the entire user input, but didn't replace it.
How do i go about... (5 Replies)
Discussion started by: malfolozy
4. Shell Programming and Scripting
I have a requirement to find and replace old date with new date value. Below is the scenario:
# In the input file, date is MM/DD/YYYY format
I want to replace with 09/30/2013. It should look like
I am using below sed command :... (4 Replies)
Discussion started by: rockygsd
5. Shell Programming and Scripting
Hi all ,
I have to write a shell script that takes a number as input , like 123
and the output will be 6 ,i.e the output will be the sum of digits of the input.
I have an idea as follows,
echo "123"|fold -1|tr '\n' '+'|bc
But the problem is after " echo "123"|fold -1|tr '\n' '+' "... (5 Replies)
Discussion started by: M.Choudhury
6. Shell Programming and Scripting
i 'd like your help about a bash script which:
1. finds inside the html file (it is attached with my post) the code number of the Latest Stable Kernel,
2.finds the link which leads to the download location of the Latest Stable Kernel version,
(the right link should lead to the file... (3 Replies)
Discussion started by: alex83
7. UNIX for Dummies Questions & Answers
I'm trying to replace the word "i.e." for "ie." in Vi but everytime I used the search tool for start looking for it (this is: /i.e.), it finds every word that contains the "i" and "e" word. I tried the following command:
However, it doesn't work.
Any help... (2 Replies)
Discussion started by: Gery
8. Shell Programming and Scripting
I don't know what I am doing wrong in the regex below.
I have the following string:
I need to split it in parts:
- Group 1: 3100000001020100518112136
- Group 2: 000000010
- Group 3:... (0 Replies)
Discussion started by: felipe.vinturin
9. UNIX for Dummies Questions & Answers
I need to replace all these lines from my text file
At the moment I know how to replace "end". But I want to replace the numbers before end as well. How can I do this ?
sed s/end/newWord/ myfile.txt newFile.txt
thanks (3 Replies)
Discussion started by: aneuryzma
10. UNIX for Dummies Questions & Answers
lets see if i can explain this in a good way.
im trying to replace some words in a file but i need to know what the words are that is beeing replaced. not sure if sed can do this.
need to know what the first . is... (2 Replies)
Discussion started by: cas