command-line

When would it be a good idea to supply an anonymous sub as a command-line argument?

I'm toying with the idea of modifying my home-made test suite to supply it anonymous subroutines as command-line arguments. The reason why I want to do this is to enhance the script's flexibility. It doesn't seem worth it to hard-code a subroutine that I am only going to use once or twice to assimilate the data in a particular manner. ...

Python code that doesn't work from the command line

A module that I have written (test.py) in Python 2.6 can be imported and run perfectly well from with the Python IDLE with the commands: import test test.run_test_suite() However if I use the command "python test.py" at the command line, it crashes apparently (according to traceback) on the command "import os". As you can see from th...

Linux command line tools: df and du

What are these abbreviations for? Disk space Free? Disk Usage? ...

Python, os.system for command-line call (linux) not returning what it should?

I need to make some command line calls to linux and get the return from this, however doing it as below is just returning 0 when it should return a time value, like 00:08:19, I am testing the exact same call in regular command line and it returns the time value 00:08:19 so I am confused as to what I am doing wrong as I thought this was h...

How do I run an incrementally-compiled NetBeans application from the command line?

I tend to develop a lot of console applications using NetBeans. Many of these applications use arguments from the command line, which I constantly change while testing and debugging, so it is frustrating to have to pull up a dialog box in NB every time I want to change the arguments. Furthermore, many of these arguments are filenames, ...

Echo All Palindromes, in C

I love the ideas presented in Brian Kernighan and Rob Pike's book, "The UNIX Programming Environment," where they focus on the point of working within an environment where you can put together many (small, precise, well understood) programs on the command line to accomplish many programming tasks. I'm brushing up on strict ANSI C conven...

PHP GTK module in php.ini

I installed PHP GTK in C:\php-gtk but when I go to run it like from the command line like this cd C:\php-gtk2 php demos\phpgtk2-demo.php It gives this error Please load the php-gtk2 module in your php.ini My ini file has this content (it is called php-cli.ini) [PHP] ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; About the php.ini in PHP-GTK ...

How to write script output to file and command-line?

I have a long-running Python script that I run from the command-line. The script writes progress messages and results to the standard output. I want to capture everything the script write to the standard output in a file, but also see it on the command line. Alternatively, I want the output to go to the file immediately, so I can use tai...

Run a java program in shell script

Possible Duplicate: run a java program Hi guys I want to run a java program using shell script. The java program is in p2 directory and its name is maxconnect4. I write the shell commands like this: java p2/maxconnect4 arg1 arg2 arg3 This shell command does not work. However, I compile the java program in this way: javac ...

How to customise the PostgreSQL/psql prompt?

How can I customize the prompt in the PostgreSQL command line tool psql (ideally in a per-user start-up script)? In particular, I'd like to be able to change it while still including the character that indicates whether the command is multi-line (eg. =, -, ', etc.). I'm running Ubuntu 10.04 (Lucid), PostgreSQL 8.4.4. ...

Can I apply PL/SQL beautifer rules from command line?

Topic is self-explanatory. My goal is to automate the process of code beautification, so a program like SQLPlus will compile code after it has been beautified. ...

Eclipse Project Compiling, Or Not?

I noticed that when I build even a very simple Java program in Eclipse, and I try to run it from the Terminal/Command Line and it gives me errors. I noticed after some hunting around that I have to actually compile the .java file I created in Eclipse in the Terminal to create and run the application. However, I can just save and run in...

R: Revolution Analytics max-mem-size?

Hello I can specify the maximum amount of memory used by R or by an object in R with parameters such as --max-mem-size=1400M at command line. But how can I use it with Revolution Analytics? I've tried but it seems not no accept any parameter. I've also tried to look for configuration files, unsuccesfully. ...

Disabling paste in console application

Hi there, So, here's a weird question: Is there a way for me to disable the menu you get when pressing the "C:\" button at the top left of the console? I am making a game, for fun, but it would take away alot of the fun if players were able to paste words into the command-line. I haven't found any topics about it, so I was wondering i...

cygwin + console2: running cygwin bash with startup dir

I am using Console2 as a bash wrapper on Windows. Most importantly, it enables me to start up a new bash tab in a predefined project directory. Now I would like to replace the Windows command line by a Cygwin bash. However, the "Startup Dir" setting in Console2 is not respected by Cygwin. Basically, I see three solution approaches: F...

Python Piping 'type' question

>> type countlines.py | python countlines.py Can someone explain the what "type" does? Does it just type the components of the file out? Can't find any documentation ...

Mac Command Line - List Available Serial Ports?

on my Mac, i currently have the available serial ports: /dev/tty.usbserial-A700dYoR /dev/cu.usbserial-A700dYoR /dev/tty.Bluetooth-PDA-Sync /dev/cu.Bluetooth-PDA-Sync /dev/tty.Bluetooth-Modem /dev/cu.Bluetooth-Modem is it possible to retrieve a list of the available serial ports of the computer from the command line (terminal)? ...

argparse missing in python 3

hi, does somebody know, why the argparse module didn't make it in python 3? it's new in python 2.7, but the 2.x branch is running out with 2.7. it makes no sense to me not to support it in the actual python 3 branch. ...

how i can make windows server 2003 see some directory from UNIX-AIX ?

how i can make windows server 2003 see some directory from UNIX-AIX ? i want share files between windows server 2003 and unix aix 6.1 ...

how i can take backup of file on UNIX-AIX ?

how i can take backup of file on UNIX-AIX ? ...