I have used http://jsbeautifier.org/ successfully using Rhino and ant, but the problem is that it is not deterministic. If you run the beautifier twice on a file the result is different from each time, e.g. each pass inserts additional array intendation on some lines.
I have spent a lot of time debugging the code in beautify.js and have...
When printing the "usage" of an application, should it be done on stdout or on stderr?
Depending on the application I've seen several cases, but there doesn't seem to be one rule. Maybe I'm mistaken and there is one good practice. In that case, what is it?
...
Hi
I'm writing an installer for some software that uses MySQL. I'm trying to run a .sql script to set up the database on install. Alas I'm having big problems getting it to execute at the moment.
The issue seems to arise from the fact that the moment you put a path to the .sql file inside the --execute="SOURCE " command everything f...
I'm currently creating a new neat CLI library for PHP, and i'd like to figure out the width/height of the console it's running in.
I've tried many things like digging through $_ENV, exec("echo $COLUMNS"), etc, but no result, while if i type echo $COLUMNS or $ROWS in bash commandline, it neatly displays the value.
What do i need to do ...
I'm new to eclipse cdt. I'm wondering how can i add command line argument (e.g.-lm) for compiling
...
Hi All,
I am trying to automate the rendering of several pov files so I made a simple
script that runs all the pov (pvengine.exe...etc) in a for loop.
However, this doesn't work since the GUI editor always comes up so that I have
to manually close it down before the next one can start. By looking on this
forum and google, there is appa...
(Context: I'm trying to monitor a long-running process from a Perl CGI script. It backs up an MSSQL database and then 7-zips it. So far, the backup part (using WITH STATS=1) outputs to a file, which I can have the browser look at, refreshing every few seconds, and it works.)
I'm trying to use 7zip's command-line utility but capture t...
I am developing a console application in C#, and was wondering if there was a way to get the "copy-paste" or "mark-paste" functionality into my application, similar or identical to that of the standard Windows command prompt. Is this a wild goose chase or a simple application variable?
...
I have been using the Perl command line with a -ne option for years, largely to process text files in ways that sed can't. Example:
cat in.txt | perl -ne "s/abc/def/; s/fgh/hij/; print;" > out.txt
I have no idea where I learned this, and have only today read perlrun and found there are other forms (perl -pe for example).
What else sh...
I have the problem that i am using relative paths for my files, so when i use "open with" method for opening a file into my program, all my paths are screwed (it will create my files in the folder where i used this "open with" method.)
How i can retrieve the full path to the .exe file that im using to open the file with "open with" meth...
I can not get the difference between these sentences! would you please write some snippet code for these sentences?thanks
The program will receive a path to a directory as the first command-line argument.
The program will receive a path to a file as the second command-line argument.
...
Hi,
I have some problem to figure out how I can maintain the pipe and redirect functionality of a shell once I find out that there are missing command line arguments.
If I for example use a scanf call, that will work with a re-direct or a pipe from a shell, but in absence of this I get a prompt, which I don't want.
I would like to ac...
I like the rake task structure and rake utilities.. I want to create a script that can do many things, and rake seems the logical choice.
I want to know how can I make it look like a regular script:
./myscript.rb cake:bake
as opposed to
rake -f myscript.rb cake:bake
any idea? Of course, rake must still be installed etc.. simply to ...
I am running a loop script in PHP command line, which send out emails to customers using PHPMailer. The problem I am receiving is that the command line script exits when the PHPMailer returns a false.
Here is the script pseudocode:
while(the loop is valid){
if(mail ID exists){
set_time_limit(30);
..compose mail..
...
I am trying to send a get or a post through a command-line argument. That is test the script in the command line before I test through a browser (the server has issues). I tried searching online, and I suppose I was probably using incorrect terminology because I got nothing. I know this is possible because I saw someone do it. I just don...
I would like to create a helper application that has no GUI yet does have access to an app bundle. I was looking at the Xcode command line project templates, but these all just generate executable files. How can I create something like a command line tool that presents no application menu yet provides access to bundle resources in a .app...
How can I create a Perl script to get some "named" command line arguments?
For example:
perl my_perl.pl -ARG_1 1234 -ARG_2 "Testing"
Where ARG_1 and ARG_2 are the arguments names and 1234 and "Testing" their values.
...
So what I'm trying to do is write Japanese characters to my terminal
screen using C and wide characters.
The question is whats wrong with what I'm doing so that I can fix it,
what other caveats should I expect while using wide characters and
do you have any other comments about what I'm trying to do?
The bad code:
#include <stdio....
When I want to force an update of the subscribers to my merge replication publication, I can go into the Replication Monitor, right click on the subscription, and choose Start Synchronizing. I'd like to be able to script this (using vba/vbscript or a command line). I'd also like users to be able to run the script (what permissions woul...
In Python there is a function: os.system(command) that runs the command passed by parameter in the command line, there is something similar in AS3 (or MXML) running an Adobe AIR Desktop Application?
...