Korn Shell SegFault

Posted by C. Ross on Stack Overflow See other posts from Stack Overflow or by C. Ross
Published on 2010-02-05T13:27:53Z Indexed on 2010/04/25 6:13 UTC
Read the original article Hit count: 253

I have found the following script causes a segmentation fault and core in kshell on AIX. Can anyone explain why I get the following results?

  • Seg Fault

    doOutput(){
      Echo "Something"
    }
    
    doOutput() >&1
    

    OR

    doOutput(){
      Echo "Something"
    }
    
    echo `doOutput()`
    

  • No Output

    doOutput(){
      Echo "Something"
    }
    
    doOutput()
    

  • Correct

    doOutput(){
      Echo "Something"
    }
    
    doOutput 
    

    OR

    doOutput(){
      Echo "Something"
    }
    
    doOutput >&1
    

  • © Stack Overflow or respective owner

    Related posts about ksh

    Related posts about shell