command-line

A command to download a file other than Wget

My host allows limited access to SSH and Linux commands. However, I can't use Wget believe it or not. I was hoping for something to download a file (.flv) from another server. Is there another command I can try? If there isn't, I could probably make use of Python, Perl or PHP (favourite) to achieve a file download. Is it possible? ...

Setting bash command-line variable to start my application

I'm pretty new to programming for Linux environments, so I don't exactly know what to search for in order to answer this question for myself. I need to understand how applications set the shell to accept a certain command to start them. For example, you can start Firefox from the command line by executing the command: firefox. I don't k...

What does #!/usr/bin/... at the start of a file mean?

I can do something like this in Haskell: #!/usr/bin/runghc main=putStrLn "Hello World" Then I can run it with ./hello.hs My question is, why is the first line ignored? Comments in haskell start with -- but the first line still seems to be ignored. It even loads in ghci. The trick also works with Python and Perl. But when I do someth...

Capture Progress From Command Line

Hello all, % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 12.4M 100 12.4M 0 0 4489k 0 0:00:02 0:00:02 --:--:-- 4653k The above is a CURL output from the command line when download the file. I have captured...

start-stop-daemon error

Hi all, I am running sstart-stop-daemon --start --exec $DAEMON $ARGS command on Ubuntu and getting the following error start-stop-daemon: user `p' not found Can anyone spot the problem? Abdul Khaliq ...

Executing external programs via commandline in a Grails application

I am attempting to create a Java source file which will interface with my Grails application. When a certain action is performed, I want this Java file to execute a program via commandline. I am attempting to do this via the Runtime.getRuntime().exec() command, however I keep getting an error about the Runtime object being undefined. ...

CURL Progress - Only Show Percentage

Hello all, Is there an option for the CURL command to show only a percentage output to shell rather than all of this, for example: % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 12.4M 100 12.4M 0 0 4489k 0 0...

CURL Progress Bar: How to pipe and extract numbers only using grep?

This is what I have so far: [my1@graf home]$ curl -# -o f1.flv 'http://osr.com/f1.flv' | grep -o '*[0-9]*' ####################################################################### 100.0% I wish to use grep and only extract the percentage from that progress bar that CURL outputs. I think my regex is not correct and I am also not sure ...

How to execute a command from with in MSI?

Hi, I have a installation setup with works like this: /exec.exe /some-command This whole setup is located on a shared disk to which my target machine have access to. All i want is to create a small MSI wrapper that basically executes the above command. I don't need to any other fancy things? I looked up on the web; there are tools tha...

How to get IE8 command line arguments from add-on.

I have IE8 add-on that needs to know command line arguments specified by user. The problem is that real processes have command lines: c:\program files\Internet Explorer\iexplore.exe SCODEF:5740 CREDAT:79873 c:\program files\Internet Explorer\iexplore.exe SCODEF:5740 CREDAT:79880 instead of c:\program files\Internet Explorer\iexplor...

Jed editor: how to activate outline / class-browser mode on ubuntu

I have installed jed and jed-extras on ubuntu. I would like to have a class-browser / outline mode. So I can see the structure of the code document currently edited and easily jump to a function or class in it. The question is: What are the steps to actually activate / use the outline mode? There is supposed to be one but I can't find ...

Diff between setLine() and setValue() in Ant API Commandline.Argument class?

I don't understand the difference between these methods. Here's what the JavaDoc says: setLine(String) = Line to split into several commandline arguments. setValue(String) = Sets a single commandline argument. My confusion is that I see them being used interchangeably in the code I'm updating. An example: Commandline comma...

How do I copy from numerous release directories to a single folder

Okay this is and isn't programming related I guess... I've got a whole bunch of little useful console utilities scattered across a suite of projects that I wrote and I want to dump them all to a single directory to make using them simpler. The only issue is that I have them all compiled in both Debug and Release mode. Given that I onl...

How do I launch the Selenium IDE from the command line with a specific test case loaded?

I'm on Windows, and I want to launch Firefox and the Selenium IDE with a specified test case loaded and ready to play back. I've got as far as: >"C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -chrome "chrome://selenium-ide/content" which launches Firefox and the IDE, but I don't know enough about the Selenium IDE or Chrome to g...

How can I make a program runnable from the commandline without typing its full path?

I can best explain my question with an example. I recently downloaded Python for Windows, installed to C:\Python. So if I'm in folder X that contains myscript.py, and I want to invoke it, I have to call this: > C:\Python\python.exe myscript.py But it would be super-cool if I could just do this, from within any folder: > python myscri...

Difference between "inspect" and "interactive" command line flags in Python

What is the difference between "inspect" and "interactive" flags? The sys.flags function prints both of them. How can they both have "-i" flag according to the documentation of sys.flags? How can I set them separately? If I use "python -i", both of them will be set to 1. Related: tell whether python is in -i mode ...

Get JVM to grow memory demand as needed up to size of VM limit?

We ship a Java application whose memory demand can vary quite a lot depending on the size of the data it is processing. If you don't set the max VM (virtual memory) size, quite often the JVM quits with an GC failure on big data. What we'd like to see, is the JVM requesting more memory, as GC fails to provide enough, until the total a...

windows: command line used to launch a program

How can I find out the command line options a program was launched with under windows? ...

Using single Command line and variables.

how do you define a variable to an integer at the command line. For example if i want to assign A=22 and B=23 and then have the A and B = a separate variable such as C..? I am confused on the syntax of this at the command line. I understand how to set variables in a script but how would i do it from a command line using only 1 line? Any...

Sort subgroups of lines with command-line tools

Hi, I've been trying to find a way of sorting this with standard commandline tools, bash, awk, sort, whatever but can't find a way apart from using perl or similar. Any hint? Input data header1 3 2 5 1 header2 5 1 3 ..... ..... Output data header1 1 2 3 5 header2 1 .... Thanks ...