[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gawk syntax error
From: |
Eli Zaretskii |
Subject: |
Re: gawk syntax error |
Date: |
Thu, 30 Nov 2006 22:41:29 +0200 |
> Date: Thu, 30 Nov 2006 15:08:43 -0500
> From: "Christophel, Roger" <address@hidden>
>
> gawk '/DESC/ {print "EHCO " $2 " \n" $0} file_1 file_2
>
> I get the following error:
>
> gawk: cmd. line:1: '/DESC/
> gawk: cmd. line:1: ^ invalid char ''' in expression
>
> I'm using Windows XP professional and it seems like the ' is not being
> read as a normal apostrophe.
Yes, you cannot use '...' to quote arguments on Windows. Use "..."
instead (and escape-protect the literal " with "" or \").