command-line

Executing cmd commands in Windows from PHP Issue

Is it possible to execute cmd commands in Windows OS with PHP exec() function? I tried this: <?php try { echo exec( 'O:\test\pdftk.exe O:\test\outputs\OPP\out.pdf O:\test\outputs\OPP\out2.pdf cat output O:\test\123.pdf' ); } catch (Exception $e) { echo $e->getMessage(); } Basically, I'm trying to merge two pdf file...

Make sure Apache user is allowed to use shell

Hello, how can I make sure that Apache/web server user is allowed to execute shell commands? I would like to execute a shell command in PHP script but it doesn't work for some reason (it works when written manually in shell by hand, of course, so the command is surely correct). I believe the problem is that the user PHP is running under...

match all files in current directory

How do I achieve this in Windows using either Command-prompt or PowerShell? myprog * EDIT: I want to call myprog with each file in the current directory as an argument. ...

serve current directory from command line

could someone give me a hint, howto serve the current directory from command line with ruby? it would be great, if i can have some system wide configuration (e.g. mime-types) and simply launch it from every directory. ...

Command line utility: how to make it right?

I have several question: If there is an error which has to be displayed to the client - It is a good thing to use STDERR stream instead of STDOUT? Or is it a trivial issue? I want to add color support to output messages of this utility. Do I have to use some environment-tolerant framework for that?(it can be 256 color mode and "pure" o...

How to call a cocoa app from command-line outside?

I want to use a command-line with a argument to call my cocoa app , but in my cocoa app ,how to receive the argument , this argument is a file path, thank you very much! ...

edit security settings of a .exe from cmd prompt

Ok so I use Avira Antivir (do not comment if you are just going to tell me to get something else) I have the free version and i change the security settings of avnotify.exe, like many people who use the program, so i dont see the nag screen everytime it updates. But it seems they have been updating avnotify.exe when updates run too. so i...

Cannot see the gui for the SingleLaneBridge java applet example

Hi, I went to the this java site and loaded the files in a new project in netbeans 6.8 . I removed the package declaration and put them in the default package of the project. I tried to compile it by right clicking and selecting run(Shift + F6) on the SingleLaneBridge.java file. This program compiled without errors. This is what I got...

Is there a DCC32.exe command line switch to make it use/create .dcu files?

When compiling a Delphi project calling DCC32.EXE from a script, no .dcu files are generated. Is there a command-line switch (or .cfg setting) to make the compiler create dcu's? Will the compiler then also check the .pas file and re-create the .dcu if the source has changed? (I've seen there's a similar question for the Delphi 6 compil...

cmd line app for encryption via std in/out/error?

Now that i am thinking about it, it seems unusual that i dont know. Is there an app that allows me to encypt data with std in/out/error? perhaps something like appname -c AES -k MyTextKey (or -kh for a key made from hex data) -o stdout -i stdin I never bothered learning how to use one outside of .NET and it would be annoying to do it ...

How to know when a computer has restarted and log in via command line or c#?

Hi, I'd like to know how to restart a computer in such a way that once restarted it will log in using given credentials via a command-line command or perhaps using some other method perhaps in C# code. To give context, I'm going to need to run this remotely on Windows XP, Vista, And Windows 7 and I am attempting to form a large list of ...

setting IPV6 in command line, Win PE

Hi Team, Can i set the IPv6 ip address in command line? if possible please suggest me the command to use. I am using I am using WinPE environment which is equalant to VISTA but with out GUI features installed. Thank you. ...

How can I get entire command line string?

I'm writing a perl script that mimics gcc. This my script needs to process some stdout from gcc. The part for processing is done, but I can't get the simple part working: how can I forward all the command line parameters as is to the next process (gcc in my case). Command lines sent to gcc tend to be very long and can potentially contai...

django-admin.py is not working properly

I have just spotted that something is wrong with my django-admin.py command. I checked similar SO posts on django-admin.py problems but nothing seems to be related to my problem. I use Windows Vista (yeah, I know...). I also have many versions of django in some folder on my disk and I switch to the version I need using junction command (...

Clean way to launch the web browser from shell script ?

In a bash script, I need to launch the user web browser. There seems to be many ways of doing this: $BROWSER xdg-open gnome-open on GNOME www-browser x-www-browser ... Is there a more-standard-than-the-others way to do this that would work on most platforms, or should I just go with something like this: #/usr/bin/env bash if [ -n $...

How to run context-aware commands in Python?

I want to write some python package installing script in Python into virtualenv. I write a function for installing virtualenv def prepareRadioenv(): if not os.path.exists('radioenv'): print 'Create radioenv' system('easy_install virtualenv') system('virtualenv --no-site-package radioenv') print 'Activate...

iPhone video geo-data metadata

Is there a command line tool or ruby gem that can extract the geo-data from videos recorded on an iPhone? ...

PHP - How to run multiple commands in system, exec or shell_exec?

I'm trying to run shell command like this from php: ls -a | grep mydir But php only uses the first command. Is there any way to force php to pass the whole string to the shell? (I don't care about the output) ...

How to add custom Java command-line options?

Hi! I'd like to add custom command-line options to my Java program. Here's an example: java -cp my.jar package.Main -i input.data -o output.data How can I achieve this. Currently I only get JVMJ9VM007E Command-line option unrecognised: -i Edit: The output of java -version java version "1.5.0" Java(TM) 2 Runtime Environment, Stand...

Turning a command line app into a Cocoa GUI app on Mac OS X?

Is there any tutorials or references, if such thing is possible, to make GUI applications out of command line apps? What I mean is, having a command line app, wrap it into an app bundle and create a Cocoa GUI app that would have a simple interface to execute the command line app with its flags and parameters. ...