Sponsored Content
Top Forums Shell Programming and Scripting Problem reading terminal response string from Zsh Post 303010666 by Don Cragun on Friday 5th of January 2018 04:27:44 AM
Old 01-05-2018
The assumption is that the terminal will send its entire response to your terminal query in a single burst of characters. That burst of characters will be read as one "block" by dd and with the directive count=1 it will quit after it has successfully read that single block. Without the count=1, dd will continue reading blocks from the terminal until it hits an EOF condition, which won't happen until you type CTL-D (i.e., hold down the control key while you hit the "d" key).
This User Gave Thanks to Don Cragun For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Reading response from server

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)
Discussion started by: frustrated1
4 Replies

2. UNIX for Advanced & Expert Users

problem while getting the response back..plz help

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)
Discussion started by: splax
1 Replies

3. Shell Programming and Scripting

Running a String as a command, zsh.

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)
Discussion started by: drnkhmlck
2 Replies

4. IP Networking

Apache mod_proxy +DNS slow response problem

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)
Discussion started by: donaldfung
2 Replies

5. UNIX for Advanced & Expert Users

ssh error: Error reading response length from authentication socket

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)
Discussion started by: cpp6f
1 Replies

6. Shell Programming and Scripting

Reading output from terminal back into bash script

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)
Discussion started by: dp123
0 Replies

7. UNIX for Advanced & Expert Users

Search for an exact string in a Terminal

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)
Discussion started by: cokedude
13 Replies

8. Solaris

slow response on solaris terminal

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)
Discussion started by: skamal4u
3 Replies

9. Shell Programming and Scripting

[Solved] Need Help in reading Response file

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)
Discussion started by: mallak
6 Replies

10. UNIX for Dummies Questions & Answers

sed Or Grep Problem OR Terminal Problem?

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
BZMORE(1)						      General Commands Manual							 BZMORE(1)

NAME
bzmore, bzless - file perusal filter for crt viewing of bzip2 compressed text SYNOPSIS
bzmore [ name ... ] bzless [ name ... ] NOTE
In the following description, bzless and less can be used interchangeably with bzmore and more. DESCRIPTION
Bzmore is a filter which allows examination of compressed or plain text files one screenful at a time on a soft-copy terminal. bzmore works on files compressed with bzip2 and also on uncompressed files. If a file does not exist, bzmore looks for a file of the same name with the addition of a .bz2 suffix. Bzmore normally pauses after each screenful, printing --More-- at the bottom of the screen. If the user then types a carriage return, one more line is displayed. If the user hits a space, another screenful is displayed. Other possibilities are enumerated later. Bzmore looks in the file /etc/termcap to determine terminal characteristics, and to determine the default window size. On a terminal capa- ble of displaying 24 lines, the default window size is 22 lines. Other sequences which may be typed when bzmore pauses, and their effects, are as follows (i is an optional integer argument, defaulting to 1) : i<space> display i more lines, (or another screenful if no argument is given) ^D display 11 more lines (a ``scroll''). If i is given, then the scroll size is set to i. d same as ^D (control-D) iz same as typing a space except that i, if present, becomes the new window size. Note that the window size reverts back to the default at the end of the current file. is skip i lines and print a screenful of lines if skip i screenfuls and print a screenful of lines q or Q quit reading the current file; go on to the next (if any) e or q When the prompt --More--(Next file: file) is printed, this command causes bzmore to exit. s When the prompt --More--(Next file: file) is printed, this command causes bzmore to skip the next file and continue. = Display the current line number. i/expr search for the i-th occurrence of the regular expression expr. If the pattern is not found, bzmore goes on to the next file (if any). Otherwise, a screenful is displayed, starting two lines before the place where the expression was found. The user's erase and kill characters may be used to edit the regular expression. Erasing back past the first column cancels the search command. in search for the i-th occurrence of the last regular expression entered. !command invoke a shell with command. The character `!' in "command" are replaced with the previous shell command. The sequence "!" is replaced by "!". :q or :Q quit reading the current file; go on to the next (if any) (same as q or Q). . (dot) repeat the previous command. The commands take effect immediately, i.e., it is not necessary to type a carriage return. Up to the time when the command character itself is given, the user may hit the line kill character to cancel the numerical argument being formed. In addition, the user may hit the erase character to redisplay the --More-- message. At any time when output is being sent to the terminal, the user can hit the quit key (normally control-). Bzmore will stop sending out- put, and will display the usual --More-- prompt. The user may then enter one of the above commands in the normal manner. Unfortunately, some output is lost when this is done, due to the fact that any characters waiting in the terminal's output queue are flushed when the quit signal occurs. The terminal is set to noecho mode by this program so that the output can be continuous. What you type will thus not show on your termi- nal, except for the / and ! commands. If the standard output is not a teletype, then bzmore acts just like bzcat, except that a header is printed before each file. FILES
/etc/termcap Terminal data base SEE ALSO
more(1), less(1), bzip2(1), bzdiff(1), bzgrep(1) BZMORE(1)
All times are GMT -4. The time now is 04:52 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy