LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Solaris / OpenSolaris (https://www.linuxquestions.org/questions/solaris-opensolaris-20/)
-   -   Here-doucment, not a tty (https://www.linuxquestions.org/questions/solaris-opensolaris-20/here-doucment-not-a-tty-592244/)

frzburn 10-16-2007 08:57 AM

Here-doucment, not a tty
 
Hi guys,
I'm trying to do a simple script on a Solaris server. It works on other servers, but I have an issue on this one...

Here's the script:
Code:

#!/usr/bin/bash
/fnsw/bin/SEC_tool > test.out 2>&1 << !SEC!
logoff user=USERNAME
quit
!SEC!

exit 0

And here's test.out contents after the script's execution:
Code:

  1 logoff user=USERNAME
Not a tty.


I must use here-documents, because this command (SEC_tool) doesn't take any parameters...

Usually it works well, but here I have this "Not a tty" message. I googled a lot, but didn't find how to solve this.


Thanks!

jvhiii 10-17-2007 06:04 PM

I have no idea, but does it make a difference if your first line is:

#!/usr/bin/env bash

instead?


All times are GMT -5. The time now is 10:43 AM.