Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Modifying contents of file with sed
Name: natnit Date: April 19, 2006 at 12:23:54 Pacific OS: Win XP CPU/Ram: Athol 1 gig Product: homebuilt
Comment:
Hey again. Just wanted to thank the forum for being so helpful last time I was here. :) Helped save me from a lot of headaches, hehe.
I have a file that has a line somewhere in it that reads:
int SEED = 12345;
How would I use sed to find that instance in the file, and change the file that once, so something like
./CHANGE_SEED 21 would change that line in the file to int SEED = 21; and ./CHANGE_SEED 12345 would change it back.
Summary: How do I put the contents of a file into a variable. A file called 655.grp contains " /Brightwood/ {cat="Brightwood"} ; /East Longmeadow/ {cat="East Longmeadow"} ; /Forest Park/ {cat="Forest Park"} ...
Summary: I am trying to create a script that counts the number of files that contain a certain string. But doesn't list the files...just the number of files that actually contain it. I have what I had written ...