putc(3s)putc(3s)Name
putc, putchar, fputc, putw - put character or word on a stream
Syntax
#include <stdio.h>
int putc(c, stream)
char c;
FILE *stream;
putchar(c)
fputc(c, stream)
FILE *stream
putw(w, stream)
FILE *stream;
Description
The routine appends the character c to the named output stream. It returns the character written.
The routine is defined as (c, stdout).
The routine behaves like but is a genuine function rather than a macro.
The routine appends word (that is, int) w to the output stream. It returns zero. The routine neither assumes nor causes special alignment
in the file.
Restrictions
Because it is implemented as a macro, treats a stream argument with side effects incorrectly. In particular, `putc(c, *f++);' doesn't work
as expected.
Diagnostics
The and functions return the constant EOF upon error. The function returns a non-zero value on error.
See Alsofclose(3s), fopen(3s), fread(3s), getc(3s), printf(3s), puts(3s)putc(3s)
Check Out this Related Man Page
PUTC(3S)PUTC(3S)NAME
putc, putchar, fputc, putw - put character or word on a stream
SYNOPSIS
#include <stdio.h>
int putc(c, stream)
char c;
FILE *stream;
int putchar(c)
int fputc(c, stream)
FILE *stream;
int putw(w, stream)
FILE *stream;
DESCRIPTION
Putc appends the character c to the named output stream. It returns the character written.
Putchar(c) is defined as putc(c, stdout).
Fputc behaves like putc, but is a genuine function rather than a macro.
Putw appends word (that is, int) w to the output stream. It returns the word written. Putw neither assumes nor causes special alignment
in the file.
SEE ALSO fopen(3S), fclose(3S), getc(3S), puts(3S), printf(3S), fread(3S)DIAGNOSTICS
These functions return the constant EOF upon error. Since this is a good integer, ferror(3S) should be used to detect putw errors.
BUGS
Because it is implemented as a macro, putc treats a stream argument with side effects improperly. In particular
putc(c, *f++);
doesn't work sensibly.
Errors can occur long after the call to putc.
7th Edition November 6, 1985 PUTC(3S)
I don't know if this is the correct forum to post this but hopefully someone can atleast point me in the right direction if they can't help me.
I am trying to install the Net::Pcap module for perl from Tim Potter version .04. I have installed gcc 2.95.3 on my Solaris 8 box. I am sure it's just... (6 Replies)
Hello,
I have data in a file something like this -
UNB+UNOA:1+006415160:1+AR0000012360:ZZ+080701:0552+2++DELFOR++++T'UNH+2+DELFOR:D:97A:UN
Here, the delimiters used are + , : and ' . I have a set of such files in which these delimiters vary from one file to another.
I am developing a... (4 Replies)
Hi
I am still learning how to write shell scripts, so I started to write a script like this:
#!/bin/sh
date
echo
outputOK () {
echo $1 ""
}
outputOK () {
echo $1 ""
}
for vol in `/usr/bin/grep -E 'hfs|vxfs|nfs|cifs' /etc/fstab | egrep -v '^#' | awk '{ print $3 }'`
do
if... (7 Replies)
Hi
I am new to this forum.
Any please help me to capture ctrl x and ctrl y via a bash script.
and please tell me how to clear the prompt via bash script
BR
Ramukumar M (4 Replies)
Hi
I need to have a piece of code that check if all file systems are mounted or not.
I have to pieces of information like the output of the bdfcommand, and the file /etc/fstab.
The first is:
bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 2097152 266656... (3 Replies)
Hi
I have the following piece of code, running on a solaris 10 O.S., that is not working for NFS file systems:
for vol in `grep -E 'vxfs|ufs|nfs' /etc/vfstab | egrep -v '^#' | awk '{ print $3 }'`
do
if df -k $vol | grep $vol > /dev/null
then
outputOK "Filesystem: $vol mounted"
else... (1 Reply)