Questions tagged [exec]

This particular tag is associated with the initiation of an additional, supplementary program. It takes its name from the group of POSIX system calls that begin with "exec" (specifically "execve"), although comparable ideas can be found on various platforms, particularly when linked to launching a new process.

Optimal method for extracting PyTables table with column names stored as variable names

I have a piece of code that fulfills my requirements, but it takes more than 10 seconds to run on a table with 200 variables and 64000 rows. Is there a faster way to create a variable namespace that matches the column names? strExec = "a = table[:]" for ...

recording the results of a Node.js program in PHP using exec

I'm attempting to retrieve the output from my node.js script using PHP exec wrapped within an ajax call. I am able to make the call and receive some feedback, but I can't seem to capture the console.log output in the variable. This is how I execute the sc ...

stopping php exec from waiting

I have been trying for some time to make my PHP code run asynchronously. I've come across various posts discussing this topic. My goal is to execute additional formatting in my script but have it return quickly without waiting for the exec command re ...

Ways to run Node.js scripts within PHP

I've been diving into a project that involves using purify-css https://github.com/purifycss/purifycss After successfully installing purify-css on the server with npm, I've been attempting to run the command below through PHP using the exec() method: ...

Can dotnet exe be run on Linux using a Node.js child process?

I have an executable file that was created using dotnet. I have a server running rhc where I need to run this exe and capture its output using child-process. However, I am encountering the following error: cannot execute binary file I understand that i ...

Issue with executing Exec, passthru, and System functions

Hello everyone, my dear friends and teachers... Heart During the design phase of my current project, I have encountered a problem while using Game. Unfortunately, I did not achieve the desired outcome. HuhHuh For this project, I have been utilizing AutoHo ...

Executing commands in PHP using the exec() function and dealing with backslashes

When attempting to execute the command below using exec: ffmpeg -y -i video.mp4 -ss 1067 -i video.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts -t 32 tmp/cuts/6.ts -ss 1215 -i video.mp4 -c copy -bsf:v h264_mp4toannexb -f mpegts -t 32 tmp/cuts/7.ts ...

Python - exec - retrieving a specific data point

Currently, I am attempting to extract specific information from a lengthy string formatted as "text". My focus is on obtaining the values of "shade": >>> text = 'colors = {\r\n\r\n "1234": {\r\n ...

When initiating a new process with exec() in nodejs, is it executed concurrently with the current process? How does nodejs manage this situation?

Given that nodejs operates on a single thread, how exactly does it go about creating and managing new processes? const exec = require('child_process').exec; exec('my.bat', (err, stdout, stderr) => { if (err) { console.er ...

What is the process of running commands using PHP?

I've been attempting to convert videos into MP4 format using FFMPEG. Here is how I have it configured: private $ffmpegPath; public function __construct($con) { $this->con = $con; $this->ffmpegPath = realpath("ffmpeg/bi ...

In Python 3, a function that uses exec(astring) internally and defines a variable inside astring will not be able to return that variable

I am facing a challenge with a Python 3 function that is designed to take a string of commands, such as 'np.pi', and then attempt to define a variable using that string. The goal is to return the variable, but unfortunately, this approach is not ...

Using PHP's exec() function to manipulate character encoding via the command line

I've been struggling to pass UTF-8 text as an argument to a command line program using the exec function in PHP. It seems like there are some issues with character encoding causing trouble. When I run locale charmap from the terminal, it returns: UTF-8 . ...

Unveiling the Mysteries of Running Imagick in PHP

I recently came across a helpful post discussing how to crop images in a circular shape. However, I am encountering issues when trying to run the imagemagick script using exec in PHP - no output is being generated. I have already verified that the director ...

Steps to remotely access a file stored on a Windows drive from Ubuntu using PHP

In my Windows environment, I had the following command: exec('copy /V "'.$file.'" "'.$dest.'"'); where $file is a REMOTE file in a windows drive such as: \\server\dr1$\folder\file \\serv ...