command-line

Console Application to emulate command line

I am developing a console application. I need to emulate the way how the command line utility behaves when the F7 button is pressed, like shown below: Is it possible in C# 2008? If not, is there any workaround available? Any help much appreciated. ...

Remove a line from a csv file bash, sed, bash

I'm looking for a way to remove lines within multiple csv files, in bash using sed, awk or anything appropriate where the file ends in 0. So there are multiple csv files, their format is: EXAMPLEfoo,60,6 EXAMPLEbar,30,10 EXAMPLElong,60,0 EXAMPLEcon,120,6 EXAMPLEdev,60,0 EXAMPLErandom,30,6 So the file will be amended to: EXAMPLEfoo,...

How to obtain argument not preceded by '-' or '--'

Hi guys, i have a program that needs command line arguments in the form : ./my_program -m256M -tm -t some_other_file The "some_other_file" argument is not bound to -t (-t it's just another functionality) so i can't take it as the optarg of any of the flags, neither can i assume it is the last argument in the list. How can i do this? ...

is it safe to call "plink.exe" in an application

i want to use "plink.exe -u username -pw securepassword" on my windows visual c++ program. will username and password remain safe while calling this command? I mean can a hacker steal or sniff the username and password? (consider hacker can't get to the password directly from the exe file) ...

changing command line arguments

Hi, I am writing a C program. It takes its arguments from commandLine. I want to change the commandLine arguments in the code. As they are defined as "const char *", I can not change them using "strcpy", "memcpy", ... Also, you know, I can not just change their type from "const char *" to "char *". Is there any way to change them? Tha...

"Start" command in batch script

When using start /max program_name to start a bunch programs, how to focus on each program when it opens. For now, it open focus on the first program, and launch others on the back. thanks. OS: Windows Server 2003 Program: any windows program, like notepad PS. It will focus on newly opened program on Windows XP SP3, but not Windows se...

Mac OS X: getting file system changes of the last minute?

From older times (Mac OS 10.4) I had found this command line on the web somewhere: mdfind '(kMDItemFSContentChangeDate >= $time.now(-60)) && (kMDItemFSContentChangeDate <= $time.now)' it gave me a list of files that where changed in the last minute. This does not work anymore on Mac OS 10.6. Can anybody explain why this doesn't work? ...

numeric cycles in shell

hello, what is the name and syntax of the construction ((..)) in example below? for ((i=1;i<10;i++)) do echo $i; done it has strange variable i where are other constructions for numeric cycling in shells? ...

Hiding Command Prompt with CodeDomProvider

Hi All I've just got my own little custom c# compiler made, using the article from MSDN. But, when I create a new Windows Forms application using my sample compiler, the MSDOS window also appears, and if I close the DOS window, my WinForms app closes too. How can I tell the Compiler? not to show the MSDOS window at all? Thank you :) ...

Hiding Command Prompt with CodeDomProvider

Hi All I've just got my own little custom c# compiler made, using the article from MSDN. But, when I create a new Windows Forms application using my sample compiler, the MSDOS window also appears, and if I close the DOS window, my WinForms app closes too. How can I tell the Compiler? not to show the MSDOS window at all? Thank you :) ...

stop javascript execution

When I run javascript script file in windows command line environment, and there is a free text coming after my code. How can I stop javascript interpreter to run into it? For example: var fso = new ActiveXObject("Scripting.FileSystemObject"); delete fso; exit(); // some kind of WORKING exit command Hungry lazy frog ate a big brown fox....

zsh: strftime command not found

I am currently learning the zsh and now I wanted to use strftime but i get: zsh: command not found: strftime I think I'm doin' something wrong, since I see people using that function all the time in their dotfiles. ...

Python run command line (time)

Hi, I want to run the 'time' unix command from a Python script, to time the execution of a non Python app. I would use the os.system method. Is there any way to save the output of this in Python? My goal is to run the app several times, save their execution times and then do some statistics on them. Thank You ...

Create Custom Builds of an Xcode Project

I am going to build a Mac application written in Obj-C with Xcode. For argument's sake let's say it will have 10 optional features. I need a way to enable or disable those features to create custom builds of the application. These builds would be automated (most likely through the Mac OS X Terminal) so I would need a way to state which o...

Xcode "Build and Archive" from command line

Xcode 3.2 provides an awesome new feature under the Build menu, "Build and Archive" which generates an .ipa file suitable for Ad Hoc distribution. You can also open the Organizer, go to "Archived Applications," and "Submit Application to iTunesConnect." Is there a way to use "Build and Archive" from the command line (as part of a build...

Batch file running on Vista problem

Dear All , I have to generate keys from cWrsync, I have Command: "ssh-keygen -t rsa -q -N '' -f %ALLUSERSPROFILE%\.ssh\id_rsa" I placed that command into a batch file, that is pointing to cwRsync\bin directory, where ssh-keygen exe file is located, That batch file working fine Windows, But in Vista it is throwing unexpected result... ...

Ruby from the command line - sticking - Windows

I have seen this behavior on Windows with Ruby for a long time. If I install a gem sometimes the command line will just get "lost" and stop printing output until you go back to the command line and hit enter a few times. I notice this in other places too. Like starting up a Ruby on Rails console. Or generating a model with Rails. Have ...

Reports in Command Line FitNesse

How do I generate reports from Command Line FitNesse ? And, what types of reports are possible? xml, txt, plain? ...

Equivalent of print "-"x20 of perl in Bash or command line

In perl you can simply write print "-" x 20 and you get a line with dashes...but i need the same thing in bash/commandline on linux without perl/(g)awk etc. any ideas? The intention is to use it in the -exec of the find command and i want to prevent using simple echo "---------" ... ...

What is wrong with this recursive Windows CMD script? It won't do Ackermann properly

I'm trying to get to calculate the Ackermann function. A description of what I'm trying to achieve is at http://rosettacode.org/wiki/Ackermann_function. Using the test script, Test 0 4 gives me 5 which is correct. However Test 1 4 gives 5 not 6, and Test 2 4 gives 5 instead of 11. Where am I going wrong? ::echo off set depth=0 :ack i...