www.centos.org Forum Index CentOS 5 - General Support Need a command to find and remove specific letters from a file
|
Bottom Previous Topic Next Topic |
| |
|
|
|---|
| Poster | Thread |
|---|
|
Re: Need a command to find and remove specific letters from a file | #2 |
|
|---|---|---|---|
|
Newbie
![]()
Joined: 2009/10/29
From
Posts: 7
|
hi.. i found the answer using sed.
|
||
Posted on: 2009/11/4 6:25
|
|||
|
Re: Need a command to find and remove specific letters from a file | #3 |
|
|---|---|---|---|
|
Professional Board Member
![]()
Joined: 2007/9/3
From NYC
Posts: 666
|
It's always good to post the command you used. It can help others in the future.
|
||
Posted on: 2009/11/4 17:17
|
|||
|
Re: Need a command to find and remove specific letters from a file | #4 |
|
|---|---|---|---|
|
Newbie
![]()
Joined: 2009/11/4
From
Posts: 1
|
For those who get stuck and find this using google or whatnot, sed s/egg// will work. The -i flag will do it in place, but that's easily found using the sed man page.
|
||
Posted on: 2009/11/4 20:02
|
|||
|
Re: Need a command to find and remove specific letters from a file | #5 |
|
|---|---|---|---|
|
Newbie
![]()
Joined: 2009/10/29
From
Posts: 7
|
oops.. sorry. the command which i found was:
sed 's/the_words_that_you_want_remove_goes_here//g' filename > newfilename eg to remove "eggs" in my case from file1 and pipe to new file file2: sed 's/eggs//g' file1 > file2 |
||
Posted on: 2009/11/5 9:49
|
|||
Top Previous Topic Next Topic |
|



Topic options
Print Topic
Threaded
Newest First
ruriimasu




You cannot start a new topic.
You can view topic.