Skip to content
Advertisement

Tag: bash

why is curl waiting for a keypress?

I simply want to run the following command: It seems to connect just fine, but it hangs waiting for a keypress. How can I automatize this in a script? EDIT: I have absolutely no idea but it solved by erasing the — part of the URL. Can someone explain to me why? Answer In bash, you must use quotes (single

Unable to redirect output from bash

I’m trying to run a command through PHP for a project and have the output redirected to a file. On PHP, I’m creating a string and running the shell_exec() function with the string as a parameter: To be able to run things as root through PHP and shell_exec, I use the following: An example of this is as follows: (See

CGI web application, struggle with variables

this is my first post here. Been reading stackoverflow for a long time and i want to take a time to appreciate everything you do to help community. Thank you. A lack of knowledge in scripting area leads me to creating this post. Due to complication of my problem (in my opinion) i wasnt able to google the solution. First

Forward slash in Bash on Mac

I have this bash(version 3.2 on MacOS) function What it’s suppose to do is run phpunit with proper regex, here i am converting * to (.)* and wrapping filter to be case insensitive. Now The problem is that parsed command works perfectly fine(matched test cases run), when i run directly at terminal. But it does not when function rtf tries

Executing bash script with PHP, and input commands

I`m trying to execute a bash script using PHP, but the problem is that the script needs to have some commands and informations inputed during the execution process. This is what I`m using The script execute OK, but I`m not able to input any option on the script. Answer shell_exec() and exec() are not able to run interactive scripts. For

How to test if composer.lock is up to date?

During development (multiple people in the team) sometimes composer install returns: Warning: The lock file is not up to date with the latest changes in composer.json. You may be getting outdated dependencies. Run update to update them. Is there a way to check for this very quickly (in milliseconds, without making any changes)? I understand how composer works. However when

Advertisement