12-26-2014
Again thank you for all the answers.
Perderabo said:
Quote:
The goto command used some magic to reposition the shell's input file. This means the input file has to be seekable. A file on paper tape is an example of a non-seekable file.
Could you please explain this a bit more (regarding seekable).
Last edited by orbit; 01-02-2015 at 12:28 PM..
9 More Discussions You Might Find Interesting
1. News, Links, Events and Announcements
LINK:
Unix Manual (man page) pages in HTML
http://www.rt.com/man/
: More then 100 Commands found on a Unix system mannual pages can be obtained/refered here. Good Link.. (1 Reply)
Discussion started by: killerserv
1 Replies
2. OS X (Apple)
Hi
Does anyone know were to go (web link please?) to learn the BACIS of UNIX in OS X, I would like to know a little more about unix (for the apple) but seem to get lost in all the wen sites, and idealy find a site where i could download a manual for the unix shell in OS X.
Any ideas? (4 Replies)
Discussion started by: adrianmoore
4 Replies
3. Shell Programming and Scripting
Is there a Unix (Solaris v8 ksh) version of the old basic command gosub or goto? I've researched the return command, but can't identify the command to return from. I am not trying to return from a function. Can someone give me a basic understanding of this please? Thanks so much in advance for... (3 Replies)
Discussion started by: gozer13
3 Replies
4. UNIX for Dummies Questions & Answers
1) Can a script be made to ignore all signals.
2) Does the parent process always picks up the exit status of its children.
3) Can one program give rise to multiple processes.
4) Is a file is synonymous with a process.
5) Is the kill command only used to kill a running process. (1 Reply)
Discussion started by: yahoo14
1 Replies
5. Shell Programming and Scripting
hi guys...
am new 2 dis unix world...
am in need of a unix manual...
cud sum1 pls post sum links 2 download it?>?>? :confused:
Danks in advance... ;) ;) ;) (1 Reply)
Discussion started by: sundar_shankar
1 Replies
6. UNIX for Dummies Questions & Answers
Hi,I'm currently working on an dev environment that has no jobs to run the scripts.How can I manual run the scripts. on Unix?
---------- Post updated at 05:45 AM ---------- Previous update was at 05:43 AM ----------
Is it something like this....
../int/inbound>./filename.sh inputfilename
... (5 Replies)
Discussion started by: sonja
5 Replies
7. Shell Programming and Scripting
my code does somthing like this:
#!bin/ksh
sqlplus / | While read id
do
temp=`echo $id`
i = i+1
done
j=0
while
do
--connecting to sql and executing a Stored proc for 1st id
--checking for the status
status = $?
if
error
--need to... (1 Reply)
Discussion started by: RP09
1 Replies
8. Shell Programming and Scripting
Hi,
echo "yes or no?"
read ans
case $ans in
*)
echo "yes"
;;
*)
echo "no"
;;
*)
echo "yes or no only"
#here, if the answer is not "Y" or "N", I want to go back to asking "yes or no?" (9 Replies)
Discussion started by: erin00
9 Replies
9. Shell Programming and Scripting
Well, guys I saw a question about GOTO for Python.
So this gave me the inspiration to attempt a GOTO function for 'dash', (bash and ksh too).
Machine: MBP OSX 10.14.3, default bash terminal, calling '#!/usr/local/bin/dash'...
This is purely a fun project to see if it is possible in PURE... (3 Replies)
Discussion started by: wisecracker
3 Replies
fflush(3C) Standard C Library Functions fflush(3C)
NAME
fflush - flush a stream
SYNOPSIS
#include <stdio.h>
int fflush(FILE *stream);
DESCRIPTION
If stream points to an output stream or an update stream in which the most recent operation was not input, fflush() causes any unwritten
data for that stream to be written to the file, and the st_ctime and st_mtime fields of the underlying file are marked for update.
If stream points to an input stream or an update stream into which the most recent operation was input, that stream is flushed if it is
seekable and is not already at end-of-file. Flushing an input stream discards any buffered input and adjusts the file pointer such that
the next input operation accesses the byte after the last one read. A stream is seekable if the underlying file is not a pipe, FIFO,
socket, or TTY device.
If stream is a null pointer, fflush() performs this flushing action on all streams for which the behavior is defined above.
An input stream, seekable or non-seekable, can be flushed by explicitly calling fflush() with a non-null argument specifying that stream.
RETURN VALUES
Upon successful completion, fflush() returns 0. Otherwise, it returns EOF and sets errno to indicate the error.
ERRORS
The fflush() function will fail if:
EAGAIN The O_NONBLOCK flag is set for the file descriptor underlying stream and the process would be delayed in the write opera-
tion.
EBADF The file descriptor underlying stream is not valid.
EFBIG An attempt was made to write a file that exceeds the maximum file size or the process's file size limit; or the file is a
regular file and an attempt was made to write at or beyond the offset maximum associated with the corresponding stream.
EINTR The fflush() function was interrupted by a signal.
EIO The process is a member of a background process group attempting to write to its controlling terminal, TOSTOP is set, the
process is neither ignoring nor blocking SIGTTOU, and the process group of the process is orphaned.
ENOSPC There was no free space remaining on the device containing the file.
EPIPE An attempt is made to write to a pipe or FIFO that is not open for reading by any process. A SIGPIPE signal will also be
sent to the calling process.
The fflush() function may fail if:
ENXIO A request was made of a non-existent device, or the request was beyond the limits of the device.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
|MT-Level |MT-Safe |
+-----------------------------+-----------------------------+
SEE ALSO
getrlimit(2), ulimit(2), attributes(5), standards(5)
SunOS 5.10 1 Nov 2003 fflush(3C)