In bash you could simplify the logic as -t will timeout if a full line is not received
Under zsh -t is just a timeout for the first character being available. Use return value of read to detect a timeout, as REPLY is not emptied on timeout:
Last edited by Chubler_XL; 01-03-2018 at 09:30 PM..
I am trying to write a korn shell script which posts commands to a server and read the response back from the server.
Any idea how I can read the servers response?
I have tried doing the following:
(
LOGIN:xxxxx
command to server
read ANSWER
echo $ANSWER >file1... (4 Replies)
Hi ALL:
I am not able to get the response back from weblogic in the shell script.
The weblogic server in different account. I am able to login to that account and bring the server up but while doing a ping, the script is failing. While the same script is running fine if I run it on the account... (1 Reply)
I have a shell script that is building a string that consists of the parts of a command that I want run at the end of the string. So it looks like this:
$PART1=/path/to/command
$PART2="-arg1"
$PART3="-arg2"
and so on.
At the end of the command is a list of files I get from a loop and... (2 Replies)
My company has a private network, including a Apache web server (Linux) and some WinXP machines. The web server had been configured to use mod_proxy to connect to window update site via another company proxy server. It works for few years.
Recently, some parties had setup a DNS server on the... (2 Replies)
Hi - I am getting the error
`Error reading response length from authentication socket'
when I ssh from my cluster to another cluster, and then back to my cluster. It doesn't seem to affect anything, but it's just annoying that it always pops up and tends to confuse new users of the cluster. I... (1 Reply)
How can I get a bash script to wait and read and count $i messages that a running program (drbl clonezilla) sends to the console (terminal) and only then move on to the next line in the script when the count is matched (the next line is the last line of the script and is a reboot)?
The script... (0 Replies)
Is there hopefully a way to search for an exact string in Man Pages? I know if I want to search for anything containing -c I can just do this.
/-c
How would I search for "-c"? I want only "-c" to show up. So I tried this.
/"-c"
It took me literally and looked for the quotes also. (13 Replies)
Solaris terminal responding very slow .. we have recently put a T3 hardware in to production , the applications running are it are perfectly and no complaints from user ..but when i ssh to the server ... the terminal response is very very slow .. it takes 3 seconds to show the character i type ..... (3 Replies)
Hi All,
I have a requirement to read response file which looks like below
Ex:
NAME=SAM
DOB=01/01/1980
ADDRESS=
7658 James Street
NewYork
0000
Now, I need to take NAME, DOB, ADDRESS into variables
I am fine taking NAME and DOB
I need help on how can I... (6 Replies)
I don't know if you guys get this problem sometimes at Terminal but I had been having this problem since yesterday :( Maybe I overdid the Terminal. Even the codes that used to work doesn't work anymore.
Here is what 's happening:
* I wanted to remove lines containing digits so I used this... (25 Replies)
Discussion started by: Nexeu
25 Replies
LEARN ABOUT FREEBSD
getty
GETTY(8) BSD System Manager's Manual GETTY(8)NAME
getty -- set terminal mode
SYNOPSIS
getty [type [tty]]
DESCRIPTION
The getty utility is called by init(8) to open and initialize the tty line, read a login name, and invoke login(1).
The argument tty is the special device file in /dev to open for the terminal (for example, ``ttyh0''). If there is no argument or the argu-
ment is '-', the tty line is assumed to be open as file descriptor 0.
The type argument can be used to make getty treat the terminal line specially. This argument is used as an index into the gettytab(5) data-
base, to determine the characteristics of the line. If there is no argument, or there is no such table, the default table is used. If there
is no /etc/gettytab a set of system defaults is used. If indicated by the table located, getty will clear the terminal screen, print a ban-
ner heading, and prompt for a login name. Usually either the banner or the login prompt will include the system hostname.
Most of the default actions of getty can be circumvented, or modified, by a suitable gettytab table.
The getty utility can be set to timeout after some interval, which will cause dial up lines to hang up if the login name is not entered rea-
sonably quickly.
FILES
/etc/gettytab
/etc/ttys
DIAGNOSTICS
ttyxx: No such device or address.
ttyxx: No such file or address.
A terminal which is turned on in the ttys file cannot be opened, likely because the requisite lines are either not configured into the sys-
tem, the associated device was not attached during boot-time system configuration, or the special file in /dev does not exist.
SEE ALSO login(1), ioctl(2), tty(4), gettytab(5), ttys(5), init(8)HISTORY
A getty utility appeared in Version 6 AT&T UNIX.
BSD June 4, 1993 BSD