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. 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
5. Shell Programming and Scripting
All,
I have a file with below entries.
/java/usr/abc/123
/java/usr/xyz/123_21
/java/usr/ab12/345/234
.........
.........
And I need entry as
/java/usr/abc/config
/java/usr/xyz/config
/java/usr/ab12/config
.........
.........
Actually, I need to remove all other entries... (2 Replies)
Discussion started by: anshu ranjan
2 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. UNIX for Dummies Questions & Answers
Hi,
how could you go about removing words that begin with a certain character.
assuming that this character is '-' I currently have
echo "-hello" | sed s/-/""/
which replaces the leading dash with nothing but I want to remove the whole word, even if there are multiple words beginning... (3 Replies)
Discussion started by: skinnygav
3 Replies
8. Shell Programming and Scripting
Hi folks,
I have file with the below
1245633505 +manual mroennfeldt@news.com.au
1245633506 +manual sal@bynews.com.au
1245633506 +manual whson@btimes.com
1245633507 +manual karla.marsden@tnews.com.au
1245633508 +manual king@netn.com.au
Now, I need the output of the files only with... (4 Replies)
Discussion started by: gsiva
4 Replies
9. Shell Programming and Scripting
hi,
I want to remove comments in somany files. coments started from /* and ends with */. so i wnt to remove words /* to */
how to remove words between /* and */ in several lines of file
EX :
cat haha.txt
"HI",/*hk*/ob1,raju,/*hjh*/boju,beeju
output should be : "HI",ob1,raju,boju,beeju
... (8 Replies)
Discussion started by: spc432
8 Replies
10. Shell Programming and Scripting
Hi All,
Sample:
4051 Oct 4 10:03:36 AM 2008: TEST: end of testcase Checking Interface after reload, result fail
I need to remove first 10 words of the above line and output should be like
Checking Interface after reload, result fail
Please help me in this regard.
Thanks, (4 Replies)
Discussion started by: shellscripter
4 Replies