By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,737 Members | 1,271 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,737 IT Pros & Developers. It's quick & easy.

How to replace/substitute a character in a 20GB file without opening it.

P: 4
Hi,

I have a 20gb file which is having a bad character repeating throughout
i would like to replace it with some other character, with out opening the file.

normally i would have used a sed command
sed 's/bad_char/new_char/' <old_file >new_file

but i am not sure it would work on such a huge file......

or is there any other way in which the big files have to behandled other than sed....

Please help me regarding this....

Thanks in advance
Siri.
Feb 20 '08 #1
Share this Question
Share on Google+
1 Reply

ashitpro
Expert 100+
P: 542
Hi,

I have a 20gb file which is having a bad character repeating throughout
i would like to replace it with some other character, with out opening the file.

normally i would have used a sed command
sed 's/bad_char/new_char/' <old_file >new_file

but i am not sure it would work on such a huge file......

or is there any other way in which the big files have to behandled other than sed....

Please help me regarding this....

Thanks in advance
Siri.
well,
I guess 'sed' will be the best option for this job.
try it out and see how much time it takes
Feb 20 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.