command-line

How to animate the command line?

I have always wondered how people update a previous line in a command line. a great example of this is when using the wget command in linux. It creates an ASCII loading bar of sorts that looks like this: [======>                    ] 37% and of course the loading bar moves and the percent changes, But it doesn't make a new line. I ...

Is there replacement for cat on Windows

Hello. I need to join to binary files in *.bat script on Windows. How can I achieve that? ...

Is there a better Windows "Terminal" application?

I loath working on the command line in Windows, primarily because the terminal application is wretched to use compared to terminal applications on linux and OS X. Major complaints No standard copy/paste. You have to turn on "mark" mode and it's only available from a multi-level popup triggered by the (small) left hand corner button. ...

VS2008 Command Prompt + Cygwin

I use the VS2008 command prompt for builds, TFS access etc. and the cygwin prompt for grep, vi and unix-like tools. Is there any way I can 'import' the vcvars32.bat functionality into the cygwin environment so I can call "tfs checkout" from cygwin itself? ...

What does the number in brackets shown after unix command names mean ?

E.g man(1), find(3), updatedb(2) ? what do these numbers mean ? ...

How do I get the unix find command to print out the file size with the file name?

If I issue the find command as follows: $find . -name *.ear It prints out: ./dir1/dir2/earFile1.ear ./dir1/dir2/earFile2.ear ./dir1/dir3/earFile1.ear What I want to 'print' to the command line is the name and the size: ./dir1/dir2/earFile1.ear 5000 KB ./dir1/dir2/earFile2.ear 5400 KB ./dir1/dir3/earFile1.ear 5400 KB ...

PHP - command line arguments in Windows

I'm trying to run PHP from the command line under Windows XP. That works, except for the fact that I am not able to provide parameters to my PHP script. My test case: echo "param = ".$param."\n"; var_dump($argv); I want to call this as: php.exe -f test.php -- param=test But I never get the script to accept my parameter. The r...

What is your single most favorite command-line trick using Bash?

We all know how to use <ctrl>-R to reverse search through history, but did you know you can use <ctrl>-S to forward search if you set stty stop ""? Also, have you ever tried running bind -p to see all of your keyboard shortcuts listed? There are over 455 on Mac OS X by default. What is your single most favorite obscure trick, keyboa...

Long commands split over multiple lines in Vista/DOS batch (.bat) file

How do I make long commands go over multiple lines in a Vista/DOS batch file? ...

OCSP command-line test tool?

Hi! Does anybody know of a tool to test OCSP responses? Preferably, something that can be used from a Windows Command-line and/or can be included (easily) in a Java/python program ...

How can I create a command line (unix/linux) instruction that uses variables to execute numerous commands?

I need to rearrange some content in various directories but it's a bit of a pain. In order to debug the application I'm working on (a ruby app) I need to move my gems into my gem folder one at a time (long story; nutshell: one is broken and I can't figure out which one). So I need to do something like: sudo mv backup/gem/foo gem/ sudo ...

How can I change the text color in the windows command prompt

I have a command line program, which outputs logging to the screen. I want error lines to show up in red. Is there some special character codes I can output to switch the text color to red, then switch it back to white? I'm using ruby but I imagine this would be the same in any other language. Something like: red = "\0123" # characte...

is Microsoft sort.exe able to sort unicode UTF-16 (LE) files?

Is Microsoft sort.exe 5.1.2600.0 (xpclient.010817-1148) able to sort UTF-16 (LE) files? ...

Best way to read commandline parameters in console application

Below are two ways of reading in the commandline parameters. The first is the way that I'm accustom to seeing using the parameter in the main. The second I stumbled on when reviewing code. I noticed that the second assigns the first item in the array to the path and application but the first skips this. Is it just preference or is ...

How can I extract a range of lines from a text file on unix?

I have a ~23000 line sql dump containing several databases worth of data. I need to extract a certain section of this file (i.e. the data for a single database) and place it in a new file. I know both the start and end line numbers of the data that I want. Does anyone know a unix command (or series of commands) to extract all lines from...

Using Visual Studio's 'cl' from a normal command line

Visual Studio 2003 and 2005 (and perhaps 2008 for all I know) require the command line user to run in the 'Visual Studio Command Prompt'. When starting this command prompt it sets various environment variables that the C++ compiler, cl, uses when compiling. This is not always desirable. If, for example, I want to run 'cl' from within ...

How can I tell if a Windows application (command line or GUI) is running on locked workstation or while user is logged out

I have several applications that are part of a suite of tools that various developers at our studio use. these applications are mainly command line apps that open a DOS cmd shell. These apps in turn start up a GUI application that tracks output and status (via sockets) of these command line apps. The command line apps can be started w...

Grep and Sed Equivalent for XML Command Line Processing

When doing shell scripting, typically data will be in files of single line records like csv. It's really simple to handle this data with grep and sed. But I have to deal with XML often, so I'd really like a way to script access to that XML data via the command line. What are the best tools? ...

How do I use TextMate as my command line subversion message editor?

Simply setting the SVN_EDITOR variable to "mate" does not get the job done. It opens TextMate when appropriate, but then when I save the message and exit, I'm prompted to continue, abort or try again. It seems like the buffer isn't returned to the svn command for use. ...

How to handle UTF-8 characters in sqlite2 to sqlite3 migration

Trying the easy approach: sqlite2 mydb.db .dump | sqlite3 mydb-new.db I got this error: SQL error near line 84802: no such column: Ð In that line the script is this: INSERT INTO vehiculo VALUES(127548,'21K0065217',Ñ,'PA007808',65217,279,1989,3,468,'1998-07-30 00:00:00.000000','14/697/98-07',2,'',1); My guess is that the...