Complicating things?


 
Thread Tools Search this Thread
Top Forums Programming Complicating things?
# 1  
Old 03-30-2006
Complicating things?

So basically what im trying to do is ...

Open file, read that file, than try to find ..

We or we and replace them with I, but not replace the cases where words contain We or we, such as Went, went, etc

a and replace them with the, but not replace the cases where words contain a, such as ability, apparent, etc

A and replace them with The, same for this ...

If it were a simple replace, id just getline, and find the We, and just replace it with I but i cant just do that, can i?
# 2  
Old 03-30-2006
If this wasn't a homework question, you would just use sed, wouldn't you?
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

things root can't do

Hey all my co-workers and I are trying to put together a list of things root "Can't" do on any *NIX OS, so I wanted to come here and see what all we could come up with. Here are two to start this off: write to a read only mount FS kill a tape rewind Please add what you know. Thanks,... (5 Replies)
Discussion started by: sunadmn
5 Replies

2. Shell Programming and Scripting

moving cursor up and other things

Hi guys, this is how my script looks like so far: height=$(($(tput lines) -2)) echo 'Owner Group Other Filename' echo '----- ----- ----- --------' echo cd $directory path=$(pwd) levels=0 level=$(($(echo $path | tr '/' ' ' | wc -w) +1)) for dir in / $(echo $path |... (2 Replies)
Discussion started by: darkhider
2 Replies

3. UNIX for Dummies Questions & Answers

Just trying to find out a few things ....

Hi everyone Just a couple of quick questions if I may. Can I ask what is meant by "flavours"?? I've come across it many times in the forums and I'm guessing that it is a variery of either Linux or UNIX (I know nil about either) which has developed but not really got a clue. ... (1 Reply)
Discussion started by: Tiramisu
1 Replies

4. Programming

Question about several things in C

Hey guys, first of all I'd like to say Hi to everyone. I am new here and this is my first post. I have a question about some C stuff. I am in Computer Science and I have an assignment for a UNIX Applications course. It is really complicated, however. We're using the C language for this and... (1 Reply)
Discussion started by: V4D3R
1 Replies
Login or Register to Ask a Question