![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Nov 2008
Posts: 9
Rep Power: 0
![]() |
adjacent lines with same beginning character.
Dear All,
I have been looking for a script/command that look for two adjacent lines lines starting with same letter/character. For example, my file looks like: *********************************delete duplicates*************** # rm -rvf /home/centurion/Newfolder/donotdelte.txt # rm rvf /home/centurion/dontdelete.txt rm -rvf /home/centurion/Newfolder/trial.txt rm -rvf /home/centurion/trial.txt rm -rvf /home/centurion/Newfolder/deltethisfile.txt # rm rvf /home/centurion/dontdelete0.txt # rm rvf /home/centurion/dontdelete1.txt ********************************************************************** and I want to see all the occurances where two adjacent lines are uncommented (means start with rm). Thanks in advance. Regards Centurion |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Two consective lines starting with same starting letter. | centurion555 | Sed and Awk | 0 | Mar 18th, 2009 8:31 AM |
| Reading character input into an array (raw mode) | shoeyfighter | C | 3 | Nov 2nd, 2006 3:49 PM |
| incrementing character array elements value | n00b | C++ | 7 | Jun 24th, 2006 3:44 AM |
| Sed, insert string to the beginning of a line | Ken2 | Sed and Awk | 2 | Jun 20th, 2005 12:09 PM |
| removing certain lines from a file | Dizzutch | Perl | 9 | Jan 26th, 2005 9:55 AM |