Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Calling system() if certain text appears on the screen. Post 303033274 by ignatius on Tuesday 2nd of April 2019 06:15:24 PM
Old 04-02-2019
Ok. Solved it. Basically used getchar() to get user input to initiate Zmodem download.
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

screen resolution for a SPARC system

I have installed Solaris 10 on SPARC system (Ultra 5) And I'm using Acer AL1715 LCD monitor. The screen resolution is not just right. How to change the resolution Thanks in advance. (1 Reply)
Discussion started by: chaandana
1 Replies

2. Solaris

A strange user appears in my quotas and I can't find it in my system

Hello, I am running a Solaris 8 system. I Have encountered that each time I ask the system to report to me the users who have or are about to exceed their quota limit for disk usage, a strange number appears in a user name, it does not appear in my /etc/group or in my /etc/passwd files The user... (13 Replies)
Discussion started by: lzcool
13 Replies

3. Shell Programming and Scripting

Help supressing spool output from screen when calling sqlplus from script

I'm calling an embedded sql from my shell script file. This sql does simple task of spooling out the contents of the table (see below my sample code) into a spool file that I specify. So far so good, but the problem is that the output is also displayed on screen which I do NOT want. How can I... (3 Replies)
Discussion started by: MxC
3 Replies

4. Shell Programming and Scripting

Shell program to check if the same text appears twice in an XML file

Hi All, I am very new to this forum and beginner to shell scripting. I need a shell script to: Search for a text in XML file à if the same text appears twice in an XML file à output file name Script should loop thru every xml file of a given folder. Please help me writing this script. ... (1 Reply)
Discussion started by: amardeep001
1 Replies

5. Solaris

Solaris 8, you boot the system but does not have anything on the screen (not started)

Greetings to all. I have two computers, Sun Blade 150. the first, had the Solaris 8 system, and that system needed to clone the "second" to start it with the same settings. Use a program to clone the drive, and then have cloned, had the error: Can't read disk label. Can't open disk... (4 Replies)
Discussion started by: feliz-58
4 Replies

6. Shell Programming and Scripting

Print Terminal Output Exactly how it Appears in the Terminal to a New Text File

Hello All, I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly. Is there any way to take the output from the cat... (7 Replies)
Discussion started by: mrm5102
7 Replies
GETC(3) 						   BSD Library Functions Manual 						   GETC(3)

NAME
fgetc, getc, getc_unlocked, getchar, getchar_unlocked, getw -- get next character or word from input stream LIBRARY
Standard C Library (libc, -lc) SYNOPSIS
#include <stdio.h> int fgetc(FILE *stream); int getc(FILE *stream); int getc_unlocked(FILE *stream); int getchar(void); int getchar_unlocked(void); int getw(FILE *stream); DESCRIPTION
The fgetc() function obtains the next input character (if present) from the stream pointed at by stream, or the next character pushed back on the stream via ungetc(3). The getc() function acts essentially identically to fgetc(), but is a macro that expands in-line. The getchar() function is equivalent to getc(stdin). The getw() function obtains the next int (if present) from the stream pointed at by stream. The getc_unlocked() and getchar_unlocked() functions are equivalent to getc() and getchar() respectively, except that the caller is responsi- ble for locking the stream with flockfile(3) before calling them. These functions may be used to avoid the overhead of locking the stream for each character, and to avoid input being dispersed among multiple threads reading from the same stream. RETURN VALUES
If successful, these routines return the next requested object from the stream. Character values are returned as an unsigned char converted to an int. If the stream is at end-of-file or a read error occurs, the routines return EOF. The routines feof(3) and ferror(3) must be used to distinguish between end-of-file and error. If an error occurs, the global variable errno is set to indicate the error. The end-of-file condition is remembered, even on a terminal, and all subsequent attempts to read will return EOF until the condition is cleared with clearerr(3). SEE ALSO
ferror(3), flockfile(3), fopen(3), fread(3), getwc(3), putc(3), ungetc(3) STANDARDS
The fgetc(), getc(), and getchar() functions conform to ISO/IEC 9899:1990 (``ISO C90''). The getc_unlocked() and getchar_unlocked() func- tions conform to IEEE Std 1003.1-2001 (``POSIX.1''). BUGS
Since EOF is a valid integer value, feof(3) and ferror(3) must be used to check for failure after calling getw(). The size and byte order of an int varies from one machine to another, and getw() is not recommended for portable applications. BSD
January 10, 2003 BSD
All times are GMT -4. The time now is 10:57 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy