FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 12-22-2008, 01:09 PM
Dennis Wicks
 
Default Help - Getting lots of errors from functions and scripts

Greetings;

When I run anything that is actually a shell script starting
with #!/bin/sh and maybe any thing that uses a shell
function I get five or six screens full of messages that
look like the following and all start with /bin/sh


/bin/sh: _openssl: line 25: syntax error near
`unexpected token `('
/bin/sh: _openssl: line 25: ` -@(in|out|oid))'
/bin/sh: error importing function definition for
`_openssl'
/bin/sh: _service: line 4: syntax error in
conditional expression: unexpected token `('
/bin/sh: _service: line 4: syntax error near `@(*'
/bin/sh: _service: line 4: ` [[ ${COMP_WORDS[0]} !=
@(*init.d/!(functions|~)|service) ]] && return 0;'


One example is /usr/bin/bashbug

but all scripts that start with #!/bin/sh
seem to have the problem.

One function that has the problem is one I wrote that does
an ls and pipes it to less. As follows;


function lm ()
{
ls -laNF "$@" | $(which less)
}


Anybody have any idea about what is causing these errors
or where to look?

Many TIA!
Dennis


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 12-22-2008, 01:22 PM
Ron Johnson
 
Default Help - Getting lots of errors from functions and scripts

On 12/22/08 08:09, Dennis Wicks wrote:

Greetings;

When I run anything that is actually a shell script starting with
#!/bin/sh and maybe any thing that uses a shell function I get five or
six screens full of messages that look like the following and all start
with /bin/sh


/bin/sh: _openssl: line 25: syntax error near
`unexpected token `('
/bin/sh: _openssl: line 25: ` -@(in|out|oid))'
/bin/sh: error importing function definition for
`_openssl'
/bin/sh: _service: line 4: syntax error in
conditional expression: unexpected token `('
/bin/sh: _service: line 4: syntax error near `@(*'
/bin/sh: _service: line 4: ` [[ ${COMP_WORDS[0]} !=
@(*init.d/!(functions|~)|service) ]] && return 0;'


One example is /usr/bin/bashbug

but all scripts that start with #!/bin/sh
seem to have the problem.

One function that has the problem is one I wrote that does an ls and
pipes it to less. As follows;


function lm ()
{
ls -laNF "$@" | $(which less)
}


Anybody have any idea about what is causing these errors
or where to look?


Maybe /bin/sh is not symlinked to /bin/bash?

--
Ron Johnson, Jr.
Jefferson LA USA

I like my women like I like my coffee - purchased at above-market
rates from eco-friendly organic farming cooperatives in Latin America.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 09:17 AM.

VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org