exec Questions

5

Solved

I'm trying to write a C program that grabs command output and then i'll be passing that to another program. I'm having an issue, I cant work out how to get the command output and store it. Below is...
Picrite asked 3/9, 2011 at 10:45

6

The following works just fine when cmd finishes in the allotted time. However, the timeout is not working. While it does print "It's dead Jim", not only does it fail to print "Done w...
Nathanialnathaniel asked 18/3, 2014 at 4:8

3

Solved

How would I untar-gz a file in php without the use of exec('tar') or any other commands, using pure PHP? My problem is as follows; I have a 26mb tar.gz file that needs to be uploaded onto my serve...
Loudhailer asked 23/2, 2012 at 15:55

2

Solved

I have a php file 'run.php' which I'm running from the terminal. Within this file I have the following lines: exec("open-crawlers $port 2>&1",$out,$code); echo 'hello'; The problem that I'm ...
Foreground asked 14/9, 2011 at 10:48

5

Solved

Both will be able to execute commands in container. Both could detach the container. So what is the real difference between the docker exec and docker attach commands?
Greenish asked 21/6, 2015 at 2:23

3

Solved

I am trying to interact with an external program in C using pipe, fork and exec. I want to force the external program to perform unbuffered I/O. Here's a relevant snippet from my code so far: ... ...
Laceration asked 13/12, 2013 at 16:43

2

Solved

It is possible to run an external command by three PHP functions of system(); exec(); shell_exec(); but what are their differences? In spite of their specific applications, in most cases, the ca...
Vilberg asked 31/5, 2012 at 6:50

4

Solved

POSIX systems expose family of exec functions, that allow one to load something maybe different into current process, keeping open file descriptors, process identifier and so on. This can be done ...
Frowzy asked 15/12, 2015 at 13:22

9

Solved

I'd like to call exec in an async function and do something like the following code (which is not valid): import asyncio async def f(): await exec('x = 1\n' 'await asyncio.sleep(x)') More prec...
Abduction asked 1/7, 2017 at 9:1

9

Solved

my .bashrc has the following function function myfile { file $1 } export -f myfile it works fine when i call it directly rajesh@rajesh-desktop:~$ myfile out.ogv out.ogv: Ogg data, Skeleton v3.0 ...
Gapin asked 16/6, 2010 at 20:6

5

Example: ClassName.php <?php echo "This will crash all"; ?> In another file... foreach ($FILENAMES_WITHOUT_DOT_PHP as $name => $value) { if (class_exists( $value )) { echo "ClassNam...
Kampong asked 28/9, 2010 at 12:50

3

I am trying to run ffmpeg via the exec call on linux. However I have to use quotes in the command (ffmpeg requires it). I've been looking through the java doc for processbuilder and exec and questi...
Liverish asked 6/7, 2010 at 20:59

7

Solved

I am trying to run this code but it seems that the exec() is not executing the string inside the function: def abc(xyz): for i in fn_lst: s = 'temp=' + i + '(xyz)' exec(s) print (temp) abc('a...
Pyrology asked 12/12, 2016 at 11:48

3

Solved

I've looking for a way to express this command that excludes all executable perms except for those files ended in ".EXE" I've trying to solve it using the "find" command and -exec, please. Thanks....
Hyden asked 3/5, 2012 at 18:9

5

Solved

I used this command: docker exec compassionate_mclean cd /root/python The error returned is docker-exec: failed to exec: exec: "cd": executable file not found in $PATH Kindly help me out
Spot asked 20/1, 2015 at 4:33

5

Is it possible to execute an external program from within node.js? Is there an equivalent to Python's os.system() or any library that adds this functionality?
Warty asked 25/4, 2011 at 4:11

6

I can use CMD to execute two commands at the same time using: command1 | command2 In PHP, I assumed it should work, but it doesn't: Shell_exec("command1 | command2 "); How do I fix it?
Heatherheatherly asked 24/5, 2013 at 11:27

11

Solved

I'm trying to run a Python script from PHP using the following command: exec('/usr/bin/python2.7 /srv/http/assets/py/switch.py arg1 arg2'); However, PHP simply doesn't produce any output. Error r...
Frostbite asked 1/11, 2013 at 20:54

4

Solved

Why can I not change global variables from inside a function, using exec()? It works fine when the assignment statement is outside of exec(). Here is an example of my problem: >>> myvar = 'test' ...
Neither asked 18/1, 2010 at 1:5

2

I'd like to print every line of python script as it's being executed, as well as the log from the console as every line is being executed. For example, for this script: import time print 'hello'...
Arrogate asked 28/4, 2017 at 18:31

5

Solved

Can anyone help explain what's going on with tmux, bash, and exec? I'm trying to set up a tmux session with a 4-pane window. Ideally, I want to run a command in 3 of the panes: e.g. a Ruby Thin ser...
Fitted asked 27/3, 2011 at 4:42

1

Solved

I use fexecve(3) on Linux to execute a binary held in a memfd. Is there an equivalent for macOS? I've tried execve("/dev/fd/%d", [], []), but it failed with EACCES. Copying the file from that path...
Vitrescent asked 2/7, 2018 at 22:13

7

Solved

I'm executing the following in a PHP application: $source = '/home/user/file.ext'; $output_dir = $this->setOutputString(); chdir('/home/ben/xc/phplib/bgwatcher-2011a/a01/'); exec('php bin/...
Sappington asked 30/3, 2011 at 17:6

6

Solved

I am learning linux programming and came across exec function which is kind of very useful. But the problem is exec function arguments are very confusing and I am unable to grasp which argument is ...
Omor asked 1/10, 2012 at 16:17

6

Solved

I'm writing a C program where I fork(), exec(), and wait(). I'd like to take the output of the program I exec'ed to write it to file or buffer. For example, if I exec ls I want to write file1 file...
Bromine asked 9/4, 2010 at 4:43

© 2022 - 2024 — McMap. All rights reserved.