cli

Seeking STDOUT in PHP

I have a php script that is running in CLI and I want to display the current percent progress so I was wondering if it is possible to update the STDOUT to display the new percent. When I use rewind() or fseek() it just throws an error message. ...

Java CLI UI-design, frameworks, libraries and principles?

I'm currently working on a small utility program that only requires a command line interface, and I started wondering if Java provided any standard way of creating the CLI, in a similar way that Swing and the likes exist for GUIs. I'm not really interested in command line parameters and parsing of them, but rather the command based inter...

Is it possible to create a remote repo on GitHub from the CLI without ssh?

I did: ~$ mkdir projectname ~$ cd projectname ~$ git init ~$ touch file1 ~$ git add file1 ~$ git commit -m 'first commit' So... Is there any git command to create a new remote repo and push my commit to GitHub from here? I know it´s no big deal to just fire up a browser and head over to Create a New Repository but if there is a way to...

How to enable PDO_MYSQL for CLI?

Hi, I'm trying to learn the Symfony framework for PHP but having issues with the command line version of php. When trying to create the database tables: ./symfony doctrine:insert-sql I'm getting the following error: Couldn't locate driver named mysql This is only an issue with the command line version of php. I've had doctrine wo...

Visual Studio and .NET programming

Hi, I just want to ask whether I am right or not about .NET. So, .NET is new framework that enables you to easily implement new and old windows functions. It is similar to java in the way that its also compiled into "bytecode", but its name is Common Language Infrastructure, or CLI. This language is interpreted by .NET Framework, so code...

Zend Framework command line see errors

I'm using a method outline by gregor (http://stackoverflow.com/questions/143320/create-cronjob-with-zend-framework) to create command line execution for parts of my application such as cron jobs, admin tasks, and the like. It works, however, no errors get reported when I create a new object that has not been defined (misspelling) and oth...

merge / convert multiple pdf files into one pdf

How could I merge / convert multiple pdf files into one large pdf file? I tried the following, but the content of the target file was not as expected: convert file1.pdf file2.pdf merged.pdf I need a very simple/basic cli solution. Best would be if I could pipe the output of the merge / convert straight into pdf2ps ( as originally att...

Symfony 1.4: Programatically set environment for CLI

I have a project built on Symfony 1.4 and it has multiple environments - each developer has their own copy installed on their local machine and therefore has their own environment. I am able to dynamically set the environment in index.php, but how can I do this for CLI tasks? I could of course use --env=myenvironment on all tasks, but ...

Running Maven Goals in CLI.

I have a maven pom.xml file with multiple instances of a same goal defined (inside <execution> with different <id>s). I'm wondering how I can run a specific goal via maven command line. I've tried mvn --help, but I couldn't find an entry regarding this. ...

Ruby in DOS CLI, How to do?

I see in a lot of the tutorials and how to pages, they use the following, or something similar ruby C:\test.rb Which would parse test.rb to the interpreter and ... execute the script. But how is this done a on a windows? Ruby isn't a recognized internal command (as per the DOS output)? I know how to do all these things on Linux, and i...

Array of structures CLI

public value struct ListOfWindows { HWND hWindow; int winID; String^ capName; }; thats my structure now i have created an array of them: array<ListOfWindows ^> ^ MyArray = gcnew array<ListOfWindows ^>(5); now to test if that works i made a simple function: void AddStruct( ) { HWND temp = ::FindWindow( NULL, "Test" ); if( te...

Is there a difference between ECMA-335 and ISO/IEC 23271:2006? Also, is there a book version?

The .net CLI is standardized as both ECMA-335 and ISO/IEC 23271:2006 - is it 100% the same standard, or are there differences between these two? Also, is the standard available as a book? Makes it easier to read :) ...

How do I list everyone who has ever committed to a file in Git?

I want to get a complete list of everyone who has ever committed to a file, is there a command (blame with some arguments, maybe) do that nicely? Thanks ...

How do Ruby and Python implement their interactive consoles?

When implementing the interpreter for my programming language I first thought of a simple console window which allows the user to enter some code which is then executed as a standalone program as a shell. But there are severe problems: If every line of code the user enters is handled as a standalone program, it has to go through the tok...

Man machine interface command syntax and parsing

What I want is to add possibility to interact with application, and be able to extract information from application or event ask it to change some states. For that purpose I though of building cli utility. The utility will connect to the application and send user commands (one line strings) to the application and wait for response from ...

Replacement for Azure SDK Powershell commandlets for deployments

Hi, We've run into an issue with the New-Deployment Azure Powershell commandlet timing out; we've put in a bug report with MS. While they gave us an explanation for it (the path and timeout threshold used to upload through commandlets is different then what's used by the web portal); they don't have a fix for us. We need to get this ru...

How do you slow down the output from a DOS / windows command prompt

I have lots of experience of writing php scripts that are run in the context of a webserver and almost no experience of writing php scripts for CLI or GUI output. I have used the command line for linux but do not have much experience with DOS. Lets say I have php script that is: <?php echo('Hello world'); for ($idx = 0 ; $idx < 100 ;...

php vs bash for CLI scripting?

i have never used PHP with CLI, but i have seen scripts run with php code. i was wondering, why should we use bash, when php is so popular and is able to run in CLI. what are the pros and cons with each one? should i use php for all CLI scripting in the future? ...

how to look at txt file at 10-20-30-40-50-60-70-80-90 percent marks?

Hello, I have a large txt file, using CLI I can take a look at the beginning of the file using" head file.txt at the end: tail file.txt How do I take a look at the 10 percent of the file, 20 percent of the file, etc? ...

Controlling Gnome Volume using DBus

I'm pretty new to the whole DBus stuff so excuse me if this is trivial, but I was wondering whether, using DBus, it is possible to set the audio volume from the command line. ...