KSH: error when redirecting in subshell: stty: syntax error

KSH: error when redirecting in subshell: stty: syntax error

Post by Curt Smi » Tue, 05 Mar 1996 04:00:00



Hi,

Ksh is giving the following error messages.  A simple
test script is the following:

( ksh -c "echo hi" >>/tmp/a 2>&1 ) &

On NCR Unix SVR4.0 v3.0: the following messages are written
to /tmp/a:

UX:basename: ERROR: Incorrect usage
UX:basename: TO FIX: Usage: basename [ path [ suffix-pattern ] ]
UX:stty: ERROR: No such device
UX:stty: ERROR: No such device
UX:stty: ERROR: No such device
hi    

On UnixWare SVR4.2 v1.1.4, no error messages
DEC Unix v3.0, No error messages
DEC Unix v3.2c, YES error messages.

Putting trap "" 27 has no effect

stty -tostop is set.

Any Ideas??

Thanks.

--

Curt Smith

 
 
 

KSH: error when redirecting in subshell: stty: syntax error

Post by Curt Smi » Tue, 05 Mar 1996 04:00:00


: Hi,
:
: Ksh is giving the following error messages.  A simple
: test script is the following:
:
: ( ksh -c "echo hi" >>/tmp/a 2>&1 ) &
:
: On NCR Unix SVR4.0 v3.0: the following messages are written
: to /tmp/a:
:
: UX:basename: ERROR: Incorrect usage
: UX:basename: TO FIX: Usage: basename [ path [ suffix-pattern ] ]
: UX:stty: ERROR: No such device
: UX:stty: ERROR: No such device
: UX:stty: ERROR: No such device
: hi    

I'll answer my own question:

- A fellow net'er emailed the solution to me:

- It's the stuff in my $HOME/.kshrc file that doesn't like
  being run as a detacted process.

- The solution was to do:
  ENV=; export ENV
  In the parent shell script, since I didn't need any of the .kshrc
  stuff for this set of shell scripts.

Silly me, I forgot about shell's reading their .*rc file even if they
are just being used to interprit a script... ;-(

curt

 
 
 

1. access.conf syntax error without a syntax error

Hi:

I just compiled Apache 1.3.0 on a RISC/6000 running AIX 4.3.1

After launching httpd I get the following error:

Syntax error on line 23 of /usr/local/http/../access.conf
Expected </Directory> but saw </Directory>

I checked the file and looks normal (no unexpected eof or things like
that). I have not modified the access.conf file so I could not have
introduced any syntax errors.

Any clues ? I am totally clueless.

Thanks in advance.

Ricardo

2. Problems with system-call from AWK....

3. Module dependency errors after new kernel and stty error

4. user-space NFSd on Linux 2.2.x?

5. ksh: Syntax error

6. SSI and CGI

7. Trapping ksh syntax errors in dynamically created code

8. network neightborhood for linux?

9. ksh syntax error: if [test] then ftp <! ...!

10. syntax error: operand expected (error token is " ")

11. Odd Xconfig Errors: syntax error, non-numeric arguments...?

12. inline assembler error - porting Intel syntax to AT&T syntax

13. about error output redirect in ksh script