I know nothing about
[/CODE]In bash everything inside that loop will be in a subshell and none of your variables will survive the loop.
Andrew
Edit: Just realised the redirect is not necessary:
Thnk you for your answer. after I will try your suggestion
the problem with myscript:
If in the HOTFOLDER there are 10 .xlsx files and then I copy a new one, the loop works all file to the end.
If there is no file inside the HOTFOLDER and then I copy 10.xlsx, the loop processes only one
Hello
i am trying to remove a line using an input file , but this depends upon user interaction
here is the sample
#!/bin/sh
echo "Please enter whether you want to remove Profile"
read value1
if ;then
sed /movie/d temp.txt> temp3.txt
else
echo "Script didnot remove profile"
fi
... (3 Replies)
Could some one help me on this... For loop is working...!
for x in $i
do
for y in $j
do
z=`echo $y | awk '{print $2}'`
if
then
FS=`/usr/bin/echo $y`
echo $FS >>$Basic_location/out.csv
fi
done
CPRT="Cpoyright @ BTOIDCIM"
done (3 Replies)
here we go..
While loop is not working file.. It also invokes one more shell scripts for which parameters need to passed on.
while read line
do
####
#### We want to have a logfile for each load
####
PLog="${LogDir}/${Script}.log";
####
... (5 Replies)
Hi
I'm going to write a program in C language to watch activity on file system
in SCO UNIX openserver 5.0.6.
Apparently Linux provide an API called "inotify" , I'm wondering what's the SCO UNIX package for this ? (1 Reply)
hi everyone
i am facing a very strange problem . please help me why my while loop is not working.
below is my code
#!/bin/ksh
file=RCMC_ABC_999_080924_210813.DAR
echo ${file}
value=001
count=10
echo "abc"
echo ${count}
value=$((${value} + 1 ))
echo ${value}
while ]
do
echo... (3 Replies)
I have initiated an inotify process with --fromfile option and the file contain the paths to be monitored.
/usr/local/maldetect/inotify/inotifywait -d -r -o /usr/local/maldetect/inotify/inotify_log --fromfile /usr/local/maldetect/sess/inotify.paths.28364 --exclude (^/var/tmp/mysql.sock)... (2 Replies)
Hello all,
I would like to unzip some files with a for-loop.
Is there anyone who could tell me how I should do this - in a correct way?
for file in $(ls); do echo gzip -d < $file | tar xf -; done
The problem is the pipe - I believe. But how could I do it? I need it for the command... (4 Replies)
I wish to install inotify-tools-3.20.1-2.4.x86_64.rpm on Linux and fire inotifywait command.
Initially i was looking for "inotify-tools-3.xx.tar.gz" as instructed here http://jensd.be/248/linux/use-inotify-tools-on-centos-7-or-rhel-7-to-watch-files-and-directories-for-events
I have... (9 Replies)
Dear members, moderators and others.
While working on <insert project>, a need has surfaced to watch a directory, and when a file comes, to do appropriate action.
So, i started writing some shell code, aware of linux inotify-tools package with inotifywait.
Also, i'm seeing a lot of similar... (1 Reply)
Discussion started by: Peasant
1 Replies
LEARN ABOUT SUSE
sdl::event
SDL::Event(3) User Contributed Perl Documentation SDL::Event(3)NAME
SDL::Event - a SDL perl extension
SYNOPSIS
use SDL::Event;
my $event = new SDL::Event; # create a new event
$event->pump(); # pump all events from SDL Event Queue
$event->poll(); # Get the top one from the queue
while ($event->wait()) {
my $type = $event->type(); # get event type
# ... handle event
exit if $type == SDL_QUIT;
}
DESCRIPTION
"SDL::Event" offers an object-oriented approach to SDL events. By creating an instance of SDL::Event via new() you can wait for events, and
then determine the type of the event and take an appropriate action.
EXAMPLE
Here is an example of a simple event handler loop routine. See also SDL::App::loop.
sub loop {
my ($self,$href) = @_;
my $event = new SDL::Event;
while ( $event->wait() ) {
# ... insert here your event handling like:
if ( ref($$href{$event->type()}) eq "CODE" ) {
&{$$href{$event->type()}}($event);
$self->sync();
}
}
}
METHODS
new()
Create a new event object.
type()
Returns the type of the event, see list of exported symbols for which are available.
pump()
poll()
wait()
Waits for an event end returns then. Always returns true.
set( type, state )
Set the state for all events of the given event's type
set_unicode( toggle )
Toggle unicode on the event.
set_key_repeat( delay, interval)
Sets the delay and intervall of the key repeat rate (e.g. when a user holds down a key on the keyboard).
active_gain()
active_state()
key_state()
key_sym()
key_name()
key_mod()
key_unicode()
key_scancode()
motion_state()
motion_x()
Returns the motion of the mouse in X direction as an absolute value.
motion_y()
Returns the motion of the mouse in Y direction as an absolute value.
motion_xrel()
Returns the motion of the mouse in X direction as a relative value.
motion_yrel()
Returns the motion of the mouse in Y direction as a relative value.
button_state()
Returns the state of the mouse buttons.
button_x()
button_y()
button()
AUTHOR
David J. Goehrig Documentation by Tels <http://bloodgate.com/>
SEE ALSO
perl SDL::App
perl v5.12.1 2010-07-05 SDL::Event(3)