You are not logged in.
Pages: 1
hey, i'm fairly new to *nix programming in general
i want fortune to run for users at login time,
however i can't just slap fortune into the .bashrc file b/c that will not provide sftp a 'clean' environment for the added output to a noninteractive session messes up ssh do to its unix like implementation of things
anyway my question is a simple one, how do i check for an interactive session, where there is a tty attached to the standard input, or however it makes sense to be said.
i picked up an o'reilly bash ebook through my library but haven't had a chance to read it yet, so an example code snippet would be helpful if possible
thanks for the help
Hey what are you guys trying to pull, issue 0x0f is the same as 0x16"
Offline
anyway my question is a simple one, how do i check for an interactive session, where there is a tty attached to the standard input, or however it makes sense to be said.
That very question can be answered with :
tty -s && fortune
However, I'm not sure if this solves your problem, since sftp may actually provide a tty ... I simply don't have any experience with sftp.
i picked up an o'reilly bash ebook through my library but haven't had a chance to read it yet, so an example code snippet would be helpful if possible
and since you intend to read up, I can only encourage you to do so, and I won't give an explanation of the above, so you have something to read up ;-)
Offline
thanks, worked like a charm,
looking forward to figuring out how it works
Hey what are you guys trying to pull, issue 0x0f is the same as 0x16"
Offline
Pages: 1