Networking :: Execute Shell Scripts On Events?

Feb 20, 2009

Users will write data on a samba shared folder at any give time. I need to execute a script as soon as some thing is written to that shared folder. What I need to know how to execute a script as soon as something some data is written to that shared folder.

View 1 Replies


ADVERTISEMENT

Programming :: Generating Keyboard Events In Shell Script

Nov 23, 2010

Is it possible to generate keyboard event "Ctrl+c" from a shell script code.? I have written a shell script to compile my application and copy it to the server home directory, inorder to run my application I need to start the server (by running a shell script). But before that I need to stop the the currently running instance of my server. To do that I have to generate a keyboard event (Ctrl+c which I press it manually). I want to automate the entire process by writing a shell script I am able to run the server just by adding ./run.sh in my shell script. But before that to stop my server can I generate a keyboard by using a shell script event(ctrL+C) to stop server.?

View 2 Replies View Related

General :: Execute This On The Shell?

Mar 12, 2011

ill have this question on the test maybe : In dir00 directory create files year01.txt, year02, ...year05.txt with January calendar for 2001-2005 years in it.-i'm lost. i execute this : cat | cal 01 2001 > year01.txt

View 12 Replies View Related

Ubuntu :: How To Execute A Shell File

Jan 11, 2011

Ubuntu version 10.10File location inside a folder on DesktopFile extn : .shI need to run this file in terminal console, but what path to be given is the question.

View 5 Replies View Related

Ubuntu :: How To Execute Shell Script Using GUI

May 19, 2011

Before I re-installed ubuntu I could just double click a shell script and I got prompted to chose if I wanted to edit it or run it. Now it just opens it in gedit.How do I execute it using the GUI not the command?

View 4 Replies View Related

Programming :: Shell Can't Execute Through Ssh But Local Well?

Jan 10, 2010

The two host one is Aix 5.3 and another is Suse 10sp2 the both have the same script which including the following parts:

if [ `date +%a` = "Mon" ];then
if [ "$RESULT" = "" ]; then
echo "The `hostname` $DATE ok"

[code]...

View 1 Replies View Related

General :: Execute A Shell Script On Startup?

Mar 31, 2010

I have create a script to start a server(my first question). Now I want it to run on the system boot and start the defined server. What should I do to get this done? My findings tell me put this file in /etc/init.d location and it will execute when the system will boot. But I am not able to understand how the first argument on the startup will be start? Is this predefined somewhere to use start as $1? If I want to have a case startall that will start all the servers in the script, then what are the options I can manage.

My Script is like this:

#!/bin/bash
case "$1" in
start)
start

[code]....

View 2 Replies View Related

Programming :: Parallel Shell Scripts To Execute Using LAM?

May 29, 2011

i want to know whether we can write a shell script which can utilize 2 CPU's of a cluster...I heard its possible through C Shell [URL] But im familiar with bourne shell only....So is there a possibility to write Parallel Scripts.

View 5 Replies View Related

Programming :: Unable To Execute FOR Loop In Shell?

Apr 19, 2011

hint me why and how to execute the below for loop, the way i am trying to?

[bkcreddy17@local:~]$ cat -n test
1 date
2 ls -l

[code]...

View 14 Replies View Related

Programming :: Unable To Execute A 4GE File In Ksh Shell ?

Apr 7, 2010

I am trying to execute a 4GE file using command something like this "/usr/bin/ksh path of the file with some arguments " ex: /usr/bin/ksh /home/abc.4ge S "./xyz" . I am able to execute the 4GE without this "/usr/bin/ksh" specifying in the command which basically runs in ksh shell itself. But when i try to run it exclusively using the path of the shell it gives me an error something like this "/usr/bin/ksh: /home/abc.4ge: cannot execute". I did check the permissions and all the file has execute permission.

View 7 Replies View Related

Programming :: Getting Shell Script To Execute IF New Row In Postgres SQL Is Added?

Mar 17, 2009

I do not want to use cron.I want it to be instantaneous. I am working on a web server where the hosts turned-on safe mode and turned off a-lot of the functions for PHP (including exec) in order to secure their servers. Outside of that, I do have access to chroot and can pretty much do anything on the server. I want to use ImageMagick to create dynamic images based on form data.

I was trying to find a work-around with PHP where I can still use ImageMagick (a shell-based imagining program) by causing SQL to execute a shell script after the form data is saved to a table. Is there anyway it could cause a flag to automatically run a shell script when someone adds a new row to a certain table. It has to be instantaneous, more or less, so that the user isn't sitting there waiting for a minute for cron to catch any changes to the database.

View 1 Replies View Related

Programming :: Execute A Shell Script (with Source Command)?

Nov 19, 2010

This is weird. I have a shell script with no execute rights.$ chmod -x test.shThen I try$ test.shwhich does not work. (I have "." in PATH)When I do$ . test.shit works! I can run the script even though I have no execute rights. Why is that?Another question: If I have a shell script without a hash bang, I still can execute the shell script. Why? What does hash bang do? If there is no hash bang, why is the shell script run? What does the hash bang do

View 9 Replies View Related

Programming :: Shell Script To Execute Oracle Procedure

Jul 19, 2010

I am writing shell script for executing oracle procedure. Shell script need to take 3 parameters from one data file rest of the parameters need to pass in command line it self. Total 7 parameters are need to pass for shell script.1st,3rd,5th parameters need to take from dat file and rest of 4 parameters from command line.

Below is one oracle procedure:
EXEC CIM_MGMT_INSTALL.addFlow('$1','1.0','$1','Settings','$2','ECCD2',NULL,1);
$1is 1st and 3rd both places need to pass same parameter.$1,$2 need to take from data file as earlier says.

View 2 Replies View Related

General :: Read A Line Of C Comamnd And Execute In Shell Script?

Nov 9, 2010

I am using following code to read a lien from a file and store the value to a variable $line and execute it.

while read line
do
./$line &

[code]...

View 6 Replies View Related

Software :: Execute A Shell Script From A Simple Html Web Page?

Mar 11, 2010

I wish to execute a shell script once a button on my html page is clicked.

View 7 Replies View Related

Software :: Execute Shell Commands That Require Root Password From PHP?

Jun 26, 2010

php. I am developing a web-interface for an application that sometimes needs root privs. Editting /etc/sudoers is not an option since the web interface needs to be portable to other users when they install my application. Is there any workaround ?PHP Code:

php code:$command = "./script.sh /dev/$DISKNAME &";$shellOutput = shell_exec($command); 
Code:

[code]...

View 2 Replies View Related

General :: Write A Shell Script That Allows Only User 1 And User 2 To Execute A Program?

Feb 25, 2010

I've looked everywhere but I can't find where to change the default box for incoming mail, or am I on the wrong track. It's a nuisance having to change folders and I can't configure wastebin to empty on exit.And I can't get kmail to import from evolution. Do I have to go to the evolution storage and do it manually, and if so, how do I do that?

View 1 Replies View Related

Programming :: Sudo In Shell Script \ Ask For The Password Then Execute The Script At Background And Get Back To Menu?

May 27, 2011

Whats wrong with this line?Code:sudo -u user /usr/bin/nohup sh /home/user/somescript.sh &This should ask for the password then execute the script at background and get back to menu

View 8 Replies View Related

Server :: Parameter To Execute Shell Script On Puppet Client Through Puppet Server?

Feb 15, 2010

I have installed a puppet server and its client on Centos.Puppet server and its client is running fine and its update whatever changes made on Puppet server is updatedon its client but i am unable to execute script (Bash shell)on the client through Puppet server. So please advice a suitable class or parameter for Puppet server so that it could execute on its client

View 3 Replies View Related

CentOS 5 :: Can't Execute Things In /tmp Now But Is There A Way To Execute Only One File And No More?

Feb 17, 2011

i created a /tmp partition amd mounted it like this:" mount -o loop,noexec,nosuid,rw /usr/tmpDSK /tmp"
I know i can't execute things in /tmp now but is there a way to execute only one file and no more???

View 1 Replies View Related

Fedora Security :: Where Does Firestarter Get 'events'

Jul 18, 2009

Running Fedora 10 and 11. Using Firestarter firewall.Does anyone know where Firestarter gets the Events which it displays?I do not find anything in /etc/firestarter/.I suspect Firestarter looks in a log file which Fedora keeps somewhere.

View 2 Replies View Related

OpenSUSE :: Can't Audit Logout Events From Ssh Or Su In 11.0?

Feb 16, 2010

I am trying to setup auditing for NISPOM requirements using the built-in linux audit kernel which uses auditd and audit.rules for setup. I have been able to meet all other requirements, but I cannot find a way to audit user logout actions. My audit.rules file is listed below

Code:
#This file contains the a sample audit configuration intended to
# meet the NISPOM Chapter 8 rules.

[code]....

View 3 Replies View Related

Ubuntu :: Modify Events That Are Logged?

Jun 5, 2011

I was looking at my logs and was wondering what the easiest way to go about removing certain things from being logged.

For instance I noticed by default Ubuntu seems to log all network traffic and handshakes with wifi etc and I would like to keep such out of my logs.

View 2 Replies View Related

General :: Syslog Events To Identify Particular?

May 24, 2011

I know about syslog and /var/log/* log files but I don't know what kind of events means particular problem.

E.g.
- hardware issues (?)
- security problem (/var/log/security)

[code]....

View 1 Replies View Related

Programming :: Way To Capture X Keyboard Events

Jan 8, 2010

I wonder if there is a way to caputure all X keyboard events, blocking them from going to the window with keyboard focus?

View 4 Replies View Related

Programming :: VB Scripting Worklsheet And Key Events?

Jan 18, 2011

am working an a worksheet where I need to lookup id in an other worksheet.The script works as long as I am staying on the same row. When pressing key up or enter the corresponmding lookup information is not placed on the very same row.In short terms, I want the lookup data to be enterd on the same row no matter what key I am pressing.

The script:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim cfind As Range
On Error Resume Next
If Intersect(Target, Range("A:A")) Is Nothing Then Exit Sub
thisRow = ActiveCell.Row

[code].....

This example is set to Enter key procedure. So when the enter key is pressed, my current row will change by 1 so I have to compensate for that. All I want is that the data will be correctly enterd no matter what key I am pressing.

View 3 Replies View Related

OpenSUSE :: Trigging Scripts From Application Events?

Jan 31, 2010

is there any way to trigger a command or script whenever a certain event happens in a application like firefox.or at least trigger a script on the launching of an application.

View 2 Replies View Related

Ubuntu :: Shotwell Tags And Events Disappeared?

Feb 27, 2011

I just finished upgrading from 10.04 to 10.10 and converting from F-spot to Shotwell, including adding a large number of new photographs (>15 k).

On opening Shotwell today I found that all "tags" and "events", including those from the F-stop imported photos, have disappeared!! (strangely the photo ratings are maintained)

No amount of searching was able to relocate them. The modification date on the photo.db in the .shotwell folder is pre-problem, so I am holding out some hope that the relevant data have not been over-written.

I am not familiar with sql so do not know how to check the db (or restore the correct headers or whatever else is needed).

View 3 Replies View Related

Ubuntu :: Separating Apache2 Error Log Certain Events

May 16, 2011

I want to separate the Apache2 Error log to log certain events in a specified file.
For example:
client denied by server configuration > denied.log
Directory index forbidden by Options directive > forbidden.log
I would like it add it to the logs as the events happen, and like the other logging systems, create new files when the current is full. i.e. denied.log.0

View 1 Replies View Related

Security :: Finding And Editing Firestarter Events Log?

Aug 15, 2010

There are far too many 'events' in Firestarter's log. I can't find which file contains the log either by searching my file system or the internet.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved