Walt Mankowski on 19 Nov 2007 18:03:35 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] Perl backticks/system question


On Mon, Nov 19, 2007 at 12:41:52PM -0500, lists@linuxnotes.net wrote:
>     root@2[cgi-bin]# perl -MConfig -le 'print $Config{sh}'
>     /bin/sh
>     root@2[cgi-bin]#
>     root@2[cgi-bin]# ls -al `which sh`
>     lrwxrwxrwx 1 root root 4 Jul  6 12:59 /bin/sh -> bash
> 
> So it looks like I am using the same shell, but still getting the errors.

(Lots of stuff snipped since it was becoming unreadable anyway.)

It's clear that perl is using bash.  But you said that you could enter
commands with parens from the command line and not get any errors,
which implies that maybe your own shell is something other than bash.

Here's what happens when I try to use parens from bash:

$ echo a(b)c
bash: syntax error near unexpected token `('
$ echo a\(b\)c
a(b)c

Are you sure your shell is bash?  What do you see when you enter

$ echo $SHELL

Walt

Attachment: signature.asc
Description: Digital signature

___________________________________________________________________________
Philadelphia Linux Users Group         --        http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion  --   http://lists.phillylinux.org/mailman/listinfo/plug