10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All,
I need one help to replace particular words in file based on if finds another words in that file .
i.e.
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
8 Replies
2. UNIX for Dummies Questions & Answers
Hello,
I would like to change my setting in a file to the setting that user input.
For example, by default it is
ONBOOT=ON
When user key in "YES", it would be
ONBOOT=YES
--------------
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
5 Replies
3. Shell Programming and Scripting
Hi ,
I need to count the number of errors associated with the two words occurring in the file. It's about counting the occurrences of the word "error" for where is the word "index.js". As such the command should look like. Please kindly help. I was trying: grep "error" log.txt | wc -l (1 Reply)
Discussion started by: jmarx
1 Replies
4. UNIX for Dummies Questions & Answers
I have an assignment and I am not sure what to do.
In Unix, I use PuTTY
change the semicolon (;) to a period, and capitalize the first letter of the word immediately after it.
I know change command is M-% and "." so only one semicolon is changed but I am not sure how to... (1 Reply)
Discussion started by: kathrut43
1 Replies
5. Shell Programming and Scripting
Dear all,
I am working with names and I have a large file of names in which some words are written together (upto 4 or 5) and their corresponding single forms are also present in the word-list.
An example would make this clear
annamarie
mariechristine
johnsmith
johnjoseph smith
john
smith... (8 Replies)
Discussion started by: gimley
8 Replies
6. Shell Programming and Scripting
Hello,
I have a complex problem. I have a file in which words have been joined together:
Theboy ranslowly
I want to be able to correctly split the words using a lookup file in which all the words occur:
the
boy
ran
slowly
slow
put
child
ly
The lookup file which is meant for look up... (21 Replies)
Discussion started by: gimley
21 Replies
7. Shell Programming and Scripting
Hi, I have am using a file that contains names that I want to replace.
Basically file 1 looks like this
jack
joe
james
john
I have another file (file 2) that looks like this
jack 2345
joe 6848
james 3342
john 3432
Basically I want to replace column1 from file1... (4 Replies)
Discussion started by: kylle345
4 Replies
8. Shell Programming and Scripting
Hi,
I have a file that looks like this:
br0
br0
br1
br10
br11
br12
br13
br14
br15
br15
br2
br2
br3
br4
br5
br6
br7 (5 Replies)
Discussion started by: phil_heath
5 Replies
9. Shell Programming and Scripting
I really hate to do this, but I am completely stumped. I have to create a sed script that will change the abbreviations in a file to the full word. I really just have no idea where to start. All I want is a starting point as well no actual complete answer. Thank you for your time in advance.
... (4 Replies)
Discussion started by: mauler123
4 Replies
10. Programming
I'm trying to write a program that will open an existing file supplied by the command line argument and then replace words with "We" or "we" by "I" and "a" or "A" by "The". When I run the program it reads the file, changes the word but re writes it on a new line with only the replaced words not the... (1 Reply)
Discussion started by: adam85
1 Replies