10-16-2001
stream output??
Hi all,
I've a structure let's say
typdef struct a { int a; int b; char* string} b;
I need to make the function smth like readdir(), returning everytime it's called pointer to the next structure. Let's say functions would read the next file in the directory and all the permitions put it in a structure and returns it. When it's called next time it moves to the next files, etc. (It's just an example, so you would understand my task easier). How do i make that kinda STREAM output??
Thank you all,
Regards
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
What is a good and easy to set up program on Unix FreeBSD for playing streaming MP3s. Where can I get it and how do I install it? This is FreeBSD 4.3.
Thanx. (2 Replies)
Discussion started by: ByondF1
2 Replies
2. Programming
Hi All,
I am trying to read data from two files and then compare them and only print the records on the screen that have a same ID.i.e TAGNO =CUSTOMERNO
For Eg
My Input Files are (a) Transaction (b) Customer detail
The data in file a is like:
TagNo Date Time Station... (0 Replies)
Discussion started by: rooh
0 Replies
3. UNIX for Advanced & Expert Users
:D i have searched through several sites on google for a match up for sed that would go indepth into the workings of this interactive edditor.. I use it every day and it is the edditor of my choice so i know a few tricks but would very much like to get into the more complex uses of sed.. all the... (2 Replies)
Discussion started by: moxxx68
2 Replies
4. UNIX for Dummies Questions & Answers
Hello
I wander if im doing :
ls -l and its giving me lets say 3 results :
-rw-r--r-- 1 blah other 1789 May 19 2003 foo.c
-rw-r--r-- 1 blah other 1014 May 19 2003 foo.h
-rw-r--r-- 1 blah other 270 May 19 2003 foo1.c
now I would like to use the first... (1 Reply)
Discussion started by: umen
1 Replies
5. UNIX for Dummies Questions & Answers
Hi there again,
Running Solaris 10 with built-in Java. Seems to compile and run fine.
Problem is: Say I want to see contents of current directory. In a shell, I'd just write "ls" and it outputs the content.
When I write a Java file, I have the following line:
System.out.println("ls");
... (1 Reply)
Discussion started by: EugeneG
1 Replies
6. Ubuntu
Hello, I have Ubuntu 64 bit 9.04 install dual boot
I can't see stream videos through Opera
I couldnt see it in Firefox did this:
"sudo apt-get install ubuntu-restricted-extras flashplugin-nonfree"
Now I can see it in firefox but not in Opera
Should not care and just use just Firefox.
thanks (0 Replies)
Discussion started by: Pitroadrush
0 Replies
7. UNIX for Dummies Questions & Answers
Hello Everyone,
The situation is:
$ alias rm="sh abc.sh"
#abc.sh:
read input
echo "The input was: " $input
$ rm xyz.txt
should return
"The input was: xyz.txt"
Here, I want the alias "rm" to execute the file "abc.sh", where "abc.sh" should take "xyz.txt"... (1 Reply)
Discussion started by: qasim
1 Replies
8. Shell Programming and Scripting
Hi
I used this command:
mplayer http://host/axis-cgi/mjpg/video.cgi -user root -passwd root \
-cache 1024 -fps 25.0 -nosound -vc ffh264 \
-demuxer 3 -dumpstream -dumpfile output.avi It's ok but...
Video Playing is very fast! Why? Is it a synch problem?
What parameter I have to use for... (1 Reply)
Discussion started by: takeo.kikuta
1 Replies
9. Shell Programming and Scripting
Hello,
I need to tail -f a file output stream and I need to get only lines that contains "get" and "point" in the same line. It doesn't matter the order.
Then I need only the text BEFORE "point".
I have to count each line and perform other serveral actions after this has performed 3 times.... (9 Replies)
Discussion started by: Kibou
9 Replies
LEARN ABOUT REDHAT
readdir
READDIR(2) Linux Programmer's Manual READDIR(2)
NAME
readdir - read directory entry
SYNOPSIS
#include <unistd.h>
#include <linux/dirent.h>
#include <linux/unistd.h>
_syscall3(int, readdir, uint, fd, struct dirent *, dirp, uint, count);
int readdir(unsigned int fd, struct dirent *dirp, unsigned int count);
DESCRIPTION
This is not the function you are interested in. Look at readdir(3) for the POSIX conforming C library interface. This page documents the
bare kernel system call interface, which can change, and which is superseded by getdents(2).
readdir reads one dirent structure from the directory pointed at by fd into the memory area pointed to by dirp. The parameter count is
ignored; at most one dirent structure is read.
The dirent structure is declared as follows:
struct dirent
{
long d_ino; /* inode number */
off_t d_off; /* offset to this dirent */
unsigned short d_reclen; /* length of this d_name */
char d_name [NAME_MAX+1]; /* file name (null-terminated) */
}
d_ino is an inode number. d_off is the distance from the start of the directory to this dirent. d_reclen is the size of d_name, not
counting the null terminator. d_name is a null-terminated file name.
RETURN VALUE
On success, 1 is returned. On end of directory, 0 is returned. On error, -1 is returned, and errno is set appropriately.
ERRORS
EBADF Invalid file descriptor fd.
EFAULT Argument points outside the calling process's address space.
EINVAL Result buffer is too small.
ENOENT No such directory.
ENOTDIR
File descriptor does not refer to a directory.
CONFORMING TO
This system call is Linux specific.
SEE ALSO
getdents(2), readdir(3)
Linux 1.3.6 1995-07-22 READDIR(2)