ry good as well -
especially if you order multiple books (They charge actual cost for
shipping).
On 11 Jun 99, at 10:41, Kenneth Scharf
wrote about Re: grep "\" ... how :
> Yeah I guess I really need to order a copy of the 'camel' book from
> amazon.
>
> ---
>[EMAIL PROTECTED]
>
> cat file |tr '\\' '/' >outfile
or even:
tr '\\' '/' outfile
which saves a process.
--
Do you want to crack root? Elite-hacker-tip-of-the-day:
echo 'yPnrrfq fvonryz lpnbpah grobreI q ban lnqnzrt' | tr n-za-m a-z | \
dd conv=swab 2>/dev/null | mail -s Urgen
Yup this works, though you can't save the output to the original file
(it blanks it). So I first copy the original to a backup, and then run
the backup through sed and overwrite the original (then delete the
copy). I can wrap all this in a batch script to fix the entire
directory.
I have a book
> I this case the '\'s that appear in #include statements are the ONLY
> ones that need to be changed, so I can look for #include.
Good. So you need to change `\` to `/` in lines that start with
'#include':
cat file.c |sed -e '/^[ \t]*#include/ s,\\,/,g' >outfile.c
That I think should d
On Fri, 11 Jun 1999, Kenneth Scharf wrote:
>Yeah I guess I really need to order a copy of the 'camel' book from
>amazon.
I heartily recommend it! I have been extremely impressed with perl. In
hindsight, it was one of my best investments (time and money).
Yeah I guess I really need to order a copy of the 'camel' book from
amazon.
--- Michael Stenner <[EMAIL PROTECTED]> wrote:
> >--- [EMAIL PROTECTED] wrote:
> >> > I need to write a script to replace '\'s with
> '/',
> >> > but how can I get grep to accept '\' as a
> regular
> >> > expression (it a
I this case the '\'s that appear in #include statements are the ONLY
ones that need to be changed, so I can look for #include.
--- [EMAIL PROTECTED] wrote:
> > > If backslashes will only appear in file paths,
> you
> > > are set. If they
> > > appear in some other contents where they need to
> be
On Fri, Jun 11, 1999 at 07:09:45AM -0700, Kenneth Scharf wrote:
> I need to write a script to replace '\'s with '/', but how can I get
> grep to accept '\' as a regular expression (it assumes it to be line
> continue character, at least from the sh prompt)?
You can use sed (if I understand you cor
>--- [EMAIL PROTECTED] wrote:
>> > I need to write a script to replace '\'s with '/',
>> > but how can I get grep to accept '\' as a regular
>> > expression (it assumes it to be line continue
>> > character, at least from the sh prompt)?
-- stuff about tr and sed --
>>
>> If backslashes will o
> > If backslashes will only appear in file paths, you
> > are set. If they
> > appear in some other contents where they need to be
> > kept, then look at a
> > more sophisticated tool like sed.
> >
> This it true... the '\' also appears in printf's
> IE: fprintf("\t hello \n");
Ok... You're goi
--- [EMAIL PROTECTED] wrote:
> > I need to write a script to replace '\'s with '/',
> but how can I get
> > grep to accept '\' as a regular expression (it
> assumes it to be line
> > continue character, at least from the sh prompt)?
>
> Come to think of it, if you're trying to _replace_
> charca
> I need to write a script to replace '\'s with '/', but how can I get
> grep to accept '\' as a regular expression (it assumes it to be line
> continue character, at least from the sh prompt)?
Come to think of it, if you're trying to _replace_ charcacters, instead
of just locating them, you might
> I need to write a script to replace '\'s with '/', but how can I get
> grep to accept '\' as a regular expression (it assumes it to be line
> continue character, at least from the sh prompt)?
You need to escape the '\' with another one:
grep '\\' file
> On Fri Jun 11, 1999, Kenneth Scharf wrote:
> > I need to write a script to replace '\'s with '/', but how can I get
> > grep to accept '\' as a regular expression (it assumes it to be line
> > continue character, at least from the sh prompt)?
>
> Put the expression in single quotes?
This doesn'
On Fri Jun 11, 1999, Kenneth Scharf wrote:
> I need to write a script to replace '\'s with '/', but how can I get
> grep to accept '\' as a regular expression (it assumes it to be line
> continue character, at least from the sh prompt)?
Put the expression in single quotes?
Noel
I need to write a script to replace '\'s with '/', but how can I get
grep to accept '\' as a regular expression (it assumes it to be line
continue character, at least from the sh prompt)?
this is to port a windows program to linux.
===
Amateur Radio, when all else fails!
http://www.qsl.net/wa2mz
16 matches
Mail list logo