Re: My script to replace strings in ASCII files

2006-01-12 Thread Giorgos Keramidas
On 2006-01-11 21:40, lars [EMAIL PROTECTED] wrote: Kristian Vaaf wrote: Just curious, what do I need to do to be able to execute this script like: $ text-replace old_string new_string I find it a bit inconvenient having to edit the script for every thing I need to replace. It is. You

Re: My script to replace strings in ASCII files

2006-01-12 Thread Kristian Vaaf
You have been very helpful! I am glad people like you exist to educate those who cannot afford education. All the best in the future, Kristian Vaaf - Original Message - From: Giorgos Keramidas [EMAIL PROTECTED] Date: Thursday, January 12, 2006 2:01 pm Subject: Re: My script to replace

My script to replace strings in ASCII files

2006-01-11 Thread Kristian Vaaf
Hello! Just curious, what do I need to do to be able to execute this script like: $ text-replace old_string new_string I find it a bit inconvenient having to edit the script for every thing I need to replace. Thanks, Kristian #!/usr/local/bin/bash # # Replace old with new inside all text

Re: My script to replace strings in ASCII files

2006-01-11 Thread lars
Kristian Vaaf wrote: Hello! Just curious, what do I need to do to be able to execute this script like: $ text-replace old_string new_string I find it a bit inconvenient having to edit the script for every thing I need to replace. Thanks, Kristian #!/usr/local/bin/bash # # Replace old

Re: My script to replace strings in ASCII files

2006-01-11 Thread Charles Swiger
On Jan 11, 2006, at 3:24 PM, Kristian Vaaf wrote: Just curious, what do I need to do to be able to execute this script like: $ text-replace old_string new_string I find it a bit inconvenient having to edit the script for every thing I need to replace. Use positional arguments $1 and $2,

Re: My script to replace strings in ASCII files

2006-01-11 Thread Jerry McAllister
Hello! Just curious, what do I need to do to be able to execute this script like: $ text-replace old_string new_string Check out tr(1). It does a good job of it with very simple rules. jerry I find it a bit inconvenient having to edit the script for every thing I need to

Re: My script to replace strings in ASCII files

2006-01-11 Thread Parv
in message [EMAIL PROTECTED], wrote Jerry McAllister thusly... Just curious, what do I need to do to be able to execute this script like: $ text-replace old_string new_string Check out tr(1). It does a good job of it with very simple rules. ... sed -i '' s/old/new/g