Unix Shell - "Word too long" error on HP-UX system (tcsh)

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > January 2006 > "Word too long" error on HP-UX system (tcsh)





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author "Word too long" error on HP-UX system (tcsh)
DesctersLab

2006-01-29, 9:31 pm

hi,

I encounter an error of "Word too long" when I exceed the limit of 1020
characters
for an environment variable while writing a tcsh script on a HP-UX
11.11i system.

Is there any patch too fix this problem?
any other selution will do too

thanx,

decster

Barry Margolin

2006-01-29, 9:31 pm

In article <1138574224.098406.322680@g43g2000cwa.googlegroups.com>,
"DesctersLab" <DesctersLab@gmail.com> wrote:

> hi,
>
> I encounter an error of "Word too long" when I exceed the limit of 1020
> characters
> for an environment variable while writing a tcsh script on a HP-UX
> 11.11i system.
>
> Is there any patch too fix this problem?
> any other selution will do too


Well-known solution: Don't write scripts in tcsh.

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
*** PLEASE don't copy me on replies, I'll read them in the group ***
Chris F.A. Johnson

2006-01-29, 9:31 pm

On 2006-01-29, DesctersLab wrote:
>
> I encounter an error of "Word too long" when I exceed the limit of
> 1020 characters for an environment variable while writing a tcsh
> script on a HP-UX 11.11i system.
>
> Is there any patch too fix this problem? any other selution will do
> too


My first suggestion is to use a proper shell; tcsh is not
recommended for scripting. Use a POSIX shell such as bash or ksh.

See:
<http://www.grymoire.com/Unix/CshTop10.txt>
<http://www.grymoire.com/Unix/Csh.html#uh-0>
<http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/>

On the other hand, I tried setting and echoing a variable (both
local and environment) with a length of greater than 1200
characters. I got no error messages, so perhaps it is a feature of
your OS.

(The recommendation to use a POSIX shell for scripting still
applies.)

--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
DesctersLab

2006-01-31, 2:48 am

I am migrating to bash but my system consists of 100+ tcsh scripts
so it's imposible for me to chabge them all right away to bash...

the question is, if anyone knows of a patch for this OS (HPUX 11.11i)
that will solve my problem?

Chris F.A. Johnson

2006-01-31, 2:48 am

On 2006-01-31, DesctersLab wrote:
> I am migrating to bash but my system consists of 100+ tcsh scripts
> so it's imposible for me to chabge them all right away to bash...
>
> the question is, if anyone knows of a patch for this OS (HPUX 11.11i)
> that will solve my problem?


What problem is that? Please read <http://cfaj.freeshell.org/google>.

--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com