The following bash script is typed from a mobile device and untested.
It uses 3 extra file handles, so it can read in a round-robin order.
and produces the following order
Improvements are welcome.
This User Gave Thanks to MadeInGermany For This Post:
I'm trying to write a script that will loop through all files and directories down from a path I give it, and change the permissions and ACL. I was able to do the obvious way and change the files and folders on the same level as teh path...but I need it to continue on deeper into the file... (2 Replies)
Hi,
Please help me on this.
Suppose i have the following directory structure.
/app/data
/app/data/eng
/app/data/med
/app/data/bsc
each of the directories data,data/eng,data/med,data/bsc holds files with date extension like
a.20081230
b.20081230 and so on
I need a script to loop... (9 Replies)
I want a bit of shell script that will let me loop round all the sub-directories in a directory (i.e. ignoring any ordinary files in that directory). Let's say I just want to echo the names of the sub-directories. This sounds like it should be pretty easy - but not for me, it isn't!
All help... (4 Replies)
Hi,
I have various log files in different paths. e.g.
a/b/c/d/e/server.log
a/b/c/d/f/server.log
a/b/c/d/g/server.log
a/b/c/h/e/server.log
a/b/c/h/f/server.log
a/b/c/h/g/server.log
a/b/c/i/e/server.log
a/b/c/i/e/server.log
a/b/c/i/e/server.log
and above these have an archive folder... (6 Replies)
Hello,
I am a bit stumped on this. I am attempting to create 24 empty directories with a loop. Seems like I have incorrect syntax. When I run the following command I get the error below.
Command
$ for i in {2..24}; do mkdir $i_MAY_2011 ; doneError x 24
mkdir: missing operand
Try `mkdir... (2 Replies)
Hi ;
I want to write a shell script to read all files and directories(recursively) given in path along with their user permissions and store that result in one file as
File path Userpermissions
===== ===========
I m new to linux and my dont kno much abt shell scripting.
I will... (5 Replies)
hi,
this is my script #!/bin/ksh
cat temp_file.dat | while read line
do
read test
if ]; then
break
else echo "ERROR"
fi
done
when i execute this code , the script does wait for the user input . it directly prints "ERROR" and terminates after the no. of times as there... (3 Replies)
Hi Guys,
I need to access multiple directories whcih is following similar structure and need to copy those files in desitination path.
for eg :
if ]
then
cd ${DIR}/Mon/loaded
echo "copying files to $GRS_DIR"
cp * ${DIR}/Mon/
echo "Files of Monday are Copied"
fi
if ]
then... (5 Replies)
I have searched this quite a long time but couldn't find the right method for me to use. I need to assign read write permission to the user for specific directories and it's sub directories and files. I do not want to use ACL. This is for Solaris. Please help. (1 Reply)
Discussion started by: blinkingdan
1 Replies
LEARN ABOUT DEBIAN
iohandler
IOHandler(3I) InterViews Reference Manual IOHandler(3I)NAME
IOHandler - read input, write output, or handle an I/O exception or timeout
SYNOPSIS
#include <Dispatch/iohandler.h>
DESCRIPTION
An iohandler reads data from a file descriptor, writes data to a file descriptor, handles an I/O exception on a file descriptor, or handles
a timer's expiration. Once the user has requested the dispatcher to attach an iohandler to a file descriptor or a timer, the dispatcher
will automatically notify the iohandler when the file descriptor's I/O condition changes or the timer expires.
For convenience, the user can use a derived generic class (see IOCallback(3I)) to make the iohandler do nothing more than call an arbitrary
object's member function.
PUBLIC OPERATIONS
virtual int inputReady(int fd)
virtual int outputReady(int fd)
virtual int exceptionRaised(int fd)
The dispatcher will call one of these functions to notify an iohandler that it can read data from a file descriptor, write data to a
file descriptor, or handle an I/O exception on a file descriptor. The iohandler should perform the appropriate action and tell the
dispatcher what to do next. A negative return value means that the iohandler encountered an error or it doesn't want to read or
write anything more. The dispatcher will unlink the iohandler from its file descriptor automatically. A positive return value
means that the iohandler didn't read or write everything that it could have. The dispatcher will call the iohandler again in round
robin fashion WITHOUT checking select, which means that the iohandler will be called again as soon as the rest of the iohandlers
have performed their actions. A zero return value means that the iohandler finished reading or writing everything it was able to.
The dispatcher must check the descriptor's status with the select call before it can call the iohandler again.
virtual void timerExpired(long sec, long usec)
The dispatcher will call this function to notify an iohandler that a timer has expired. For informational purposes, the parameters
give the current time in seconds and microseconds since midnight January 1, 1970. If the iohandler wants to reset the timer, it
must tell the dispatcher to start another timer.
SEE ALSO Dispatcher(3I), IOCallback(3I)InterViews 9 January 1991 IOHandler(3I)