Am trying the following php script which finds out the maximum between 2 numbers, it accepts the arguments through command line. I check whether the input is provided right, based on the number of command line arguments.
<?php
function larger($arg1,$arg2) {
return max($arg1,$arg2);
}
if($argc > 3 || $argc < 3) print 'Invalid Arg...
Hi folks,
I'm using os.popen() in order to run a few commands.
This is what "man ls" looks like:
Any ideas why the text is displayed as such. I tried both Arial and Consolas fonts.
Help would be amazing! Thanks
...
Hi folks,
I'm currently using os.popen() but have been recommended to use subprocess.popen() instead.
Any ideas on how I can integrate this?
It would be cool and fun to have a Python shell accessible on a Django app. But I reckon that it might be a bit complex to implement.
I guess I would have to retrieve the subprocess, as a new re...
I would like to install my python application as a command line tool that should work entirelly inside the install directory (for example C:\Python26\Lib\site-packages\application)
The problem is I would like to reffer in runtime to the submodules and resources from within the application directory three. If I install the app with [cons...
This works:
gst-launch-0.10 \
videotestsrc ! ffmpegcolorspace ! 'video/x-raw-yuv' ! mux. \
audiotestsrc ! audioconvert ! 'audio/x-raw-int,rate=44100,channels=1' ! mux. \
avimux name=mux ! filesink location=gst.avi
I can let it run for a while, kill it, and then totem gst.avi displays a nice test card with tone.
However, trying to do ...
If I use the web based administrative console for JBOSS, I can navigate to Applications - EJB2 JARs and see a list of deployed EJBs. By clicking on one of these, I get a page that allows me to start and stop the selected EJB. However, I cannot find a command line equivalent. Is there a way to start/stop EJB apps in JBOSS via the comma...
I'm learning to use the PHP interactive shell, but I'm having trouble with multi-line code.
Using backslashes like in the UNIX shells doesn't seem to work. What am I doing wrong ?
php > function test(){\
php { echo "test";\
php { }\
php > test();
PHP Parse error: syntax error, unexpected T_ECHO, expecting T_STRING in php shell code on...
Hi Guys! I don't know if I am being clear with my question. I would like to ask for suggestions on the available IDEs that you I use in a command line interface (CLI) only linux distro. I am using debian. I want to program in C or C++ and I could not start because I dont have an ide or just a simple text editor. I don't have an idea how ...
I want to continuously ping a server and see a message box when ever it responds i.e. server is currently down. I want to do it through batch file.
I can show a message box as said here http://stackoverflow.com/questions/774175/how-can-i-open-a-message-box-in-a-windows-batch-file/774253#774253
and can ping continuously by
ping <serve...
As this post points out you can install Vimballs using the normal:
vim somevimball.vba
:so %
:q
But if you want to install a from the command line how do you do it? I ran a 'man vim' and it seems like the best "from source install" option was the '-S' option so I tried to install haskellmode with it:
wget 'http://projects.haskell.org...
Hi -- I have a single .java (driver.java) file I'm trying to compile and run from the command-line. It uses the external library called EXT.jar, whose structure is just a folder called EXT with a few dozen classes within it.
So I run:
javac -cp EXT.jar driver.java
This compiles the class just fine.
then when I run:
java -cp EXT.jar...
Hi all,
This may be a rudimentary question but the answer was not readily available.
I'd like to create a shell script that calls 3 tasks consecutively, but wait till the previous task is complete.
Like so:
a. call first Java program via ant
b. call third party Java application
c. call third Java program via ant
I'm wondering if t...
I have made an AIR 2.0 app that uses NativeProcess so it needs to be packaged as a native installer (.exe) rather than a .air file.
I first tried using Package Assistant but I kept getting an error telling me it cannot load keystore file. so I tried using the command line
I use:
pathToAirSDK/bin>adt -args
but I get an error telling ...
Hi I know how to write to console but if I write to console in my program and call my program from the command line it won't display anything.
How do I make it so that when I say Console.WriteLine or Console.Out.Writeline ir prints to the command prompt from which it was called and not somewhere else?
Once again I know how to do Consol...
I have little to no experience in writing batch files.
I need to write one that copies a file to a new folder and renames it
At the moment, my batch file consists of only this command:
COPY ABC.PDF \\Documents
As you can see, it only copies the file ABC.pdf to the network folder 'Documents'.
However i need to change this so it renam...
I've been using Imagemagick's mogrify on Cygwin, but at some point it stopped working. I've tried uninstalling / reinstalling, but still no go.
When I try to run mogrify it trows this error :
/usr/bin/mogrify.exe: error while loading shared libraries: ?: cannot open shared object file: No such file or directory
Anyone have any hints ...
I was looking for the best way to find the number of running processes with the same name via the command line in Linux. For example if I wanted to find the number of bash processes running and get "5". Currently I have a script that does a 'pidof ' and then does a count on the tokenized string. This works fine but I was wondering if the...
Hello,
I'm trying to execute a shell command from a java application, on the GNU/Linux platform. The problem is that the script, that calls another java application, never ends, although it runs successfully from bash. I tried to debug it:
(gdb) bt
#0 0xb773d422 in __kernel_vsyscall ()
#1 0xb7709b5d in pthread_join (threadid=3063909...
I've got an existing simple MFC app that the user specifies the input file, output file, and then a "Process" button. I'd like to just add the capability so that the input/output files are command line parameters. But, if they exist, I don't want the GUI to show up. I just want the "Process" to execute. I see where I can get the comm...
mv command doesnt accept pattern matching like grep !
Whats the good way to handle this and similar kind of operations ?
...