exec is a functionality of an operating system that runs an executable file.
Questions tagged [exec]
53 questions
0
votes
0 answers
exec() failing with return code 11
I have the following PHP script that isolates my issue:

Entity
- 101
0
votes
1 answer
puppet variables set in exec environment not accessible elsewhere in the class
I'm trying to configure a logging figuration with log paths based on a check to see if that log file exists. However, the if statements always return true even though I know /var/log/hermes/hermes.log doesn't exist. I have tested the exec…

Scott Edden
- 1
- 1
0
votes
1 answer
When use "exec 1>ok.log", how can I output the specified content to the screen within a shell script?
As follow, I only want the command echo "this is to stdout" output to my screen instead of to the file ok.log, how can I do?
I search for the usage of exec shell command, but without result, please advice me
[root@161 tmp]# bash --version
GNU…

jython.li
- 84
- 2
- 10
0
votes
2 answers
How to direct errors from with a find exec command to a log file
Hi I have the following command that does yui optimizations and runs as a cron job. I want to log the output of the command to a log file.
find . -type d -exec bash -c "cd '{}' && pwd && java -jar /opt/yui/yui.jar -o '.css$:.css' *.css" \; >…

remudada
- 57
- 8
0
votes
1 answer
Puppet EXEC: execute part of code only after another part is executed
I have the following puppet code:
exec { 'set mysql root password':
user => root,
path => "/usr/bin:/usr/sbin:/bin",
command => "/usr/bin/mysqladmin -u root password \'${root_pwd}\'",
onlyif => 'grep…

Spaniard89
- 107
- 1
- 3
- 7
0
votes
2 answers
How to pass parameter for Exec from notify?
I've the following Puppet manifest:
# PHP Configuration
class php {
exec { "php5enmod $module":
path => "/usr/sbin",
command => "php5enmod $module",
}
file {'/etc/php5/conf.d/upload_limits.ini':
ensure => present,
owner =>…

kenorb
- 6,499
- 2
- 46
- 54
0
votes
2 answers
Script out SQL Job Create Statement Without SSMS
Does anyone have an idea of how to generate the Create statement for a SQL Agent Job? I've looked everywhere, and I can't seem to find a search result that doesn't involve using SSMS and going through the Object Explorer. I've gone off and found…

Black Dynamite
- 523
- 2
- 5
- 16
0
votes
1 answer
Strange behavour of which in a shell script launched as a forked process
So I have a java process that is doing some automation. One of the things it has to do is find the JDK home on random machines.
So I wrote a shell script to try and find the JDK home assuming that javac is on the path.
While testing this shell…

Stephen Connolly
- 231
- 1
- 4
0
votes
0 answers
Executing a command as apache
This script keeps outputting a 1. and I cannot understand why.
I have also tried the above code without the nohup. I have the following line in my sudoers…

Lord Loh.
- 1,089
- 3
- 16
- 25
0
votes
1 answer
Monit runs exec action too often
I've written a script which sends me an sms notification. I call with exec action in monit test. It works, but I'm getting overwhelmed by messages. Is there a way to suppress sending subsequent messages if check fails until it succeeds?
Here is the…

Dmitry Vyal
- 109
- 2
0
votes
2 answers
Puppet: exec onlyif value is not equal
I have a script that really only needs to be run one time on a server, i.e. at deployment time, but figured it would be best to have Puppet manage it. The script remaps several legacy user id's that conflict with local system users.
The way I check…

Banjer
- 3,974
- 12
- 41
- 47
0
votes
1 answer
Shell script Process PID logging and maintenance using exec
I am trying to launch a java process as a server and then might periodically need to restart/kill it at certain times. Since I use a shell script to launch java jvm(to build classpath), I thought of logging the shell script process id using $$ and…

aditya
- 13
- 2
0
votes
1 answer
execute command on icmp request
I'd like to know how/if it is possible to get my linux (ubuntu) box to exec a command (script) on incoming icmp/ping (or other network events) requests?
Like e.g. playing a "ping" sound when being pinged, or playing an alert sound on specific source…

nonchip
- 67
- 9
0
votes
4 answers
CGI error from PHP when running exec() on IIS
Windows Server 2003 x64
PHP 5.2
IIS 6.0
The program Ink2Png.exe is set with Everyone->Read and Execute permissions.
As does its dependency (microsoft.ink.dll)
PHP Safe Mode is off
exec() is passed [the full exe path], space, [full path to another…

Patrick
- 99
- 1
- 5
0
votes
2 answers
Exclude pings from apache error logs (ran from PHP exec)
Now, for a number of reasons I need to ping several hosts on a regular basis for a dashboard display.
I use this PHP function to do it:
function PingHost($strIpAddr) {
exec(escapeshellcmd('ping -q -W 1 -c 1 '.$strIpAddr), $dataresult,…

fooraide
- 135
- 4