command-line

Creating bash script of a complex linux command

I have few long commands that I will be using on a day to day basis. So I though it would be better to have a bash script where I could pass arguments, thus saving typing. I guess this is the norm in Linux but I am kind of new to it. Could someone show me how to do it. A example is the following command cut -f <column_number> <filename>...

Diffrence between cd and chdir

what is the difference between cd and chdir command. both commands execute the same function. If both have the same function , why do we need two commands ?? ...

Update a Maven project version from script

Hi, First of all, I do have some sort of understanding that the following might not be the generally accepted way to do things. We have a Maven 2 project that has a version number which should be updated each week or so, during a new release. During this process, I've tried to eliminate all the things one has to remember and I've made ...

How to execute CMD commands in flex using actionscript?

Hi, I would like to execute a CMD command from my flex application programmatically. Something like > mediaplayer.exe "mySong.mp3" I also tried using fscommand but was not successful. While googling I learnt that its not supported by AIR. I would like to know if there is any other alternative for executing the commands. Thanks... ...

.bat file behaves wrong from command line

I have a .bat file that simply opens up two different browsers and points them to unique links. After it opens up the first browser, it waits a few seconds, then opens up the second browser. What I expect to happen is that the second browser's window will automatically be focused and active. This behavior only happens when I click on the...

parsing space separated text in C

I'm writing a program for a school project that is supposed to emulate the Unix shell, in a very basic form. It's basically parsing input, then doing a fork/exec. I need to be able to read arguments in the program (not as arguments passed to the program from the command line) individually. For example, I will prompt: Please enter a com...

How do I have TestNG run tests in specific groups (from the command-line)?

I'm invoking TestNG from the command-line like this: java org.testng.TestNG -groups "foo" testng.xml ...with the intention of only running tests annotated with: @Test(groups = { "foo" }) ...but it's running all my tests. Do I need to change my testng.xml file? <suite name="BarSuite" verbose="1"> <test name="AllInPackage"> ...

bundle a file with a command-line utility

can i bundle a file with a command-line Utility in OS X? i use Foundation framework, and hope there is a way to drag some files to project and then use them in code, like in Cocoa ...

How can you determine how a console application was launched?

How can I tell whether the user launched my console application by double-clicking the EXE (or a shortcut), or whether they already had a command line window open and executed my console app within that session? ...

How to list specific type of files in recursive directories in shell?

How can we find specific type of files i.e. doc pdf files present in nested directories. command I tried: $ ls -R | grep .doc but if there is a file name like alok.doc.txt the command will display that too which is obviously not what I want. What command should I use instead? ...

How can I pass a file argument to my bash script using a Terminal command in Linux?

Hello everyone! So my question is how can I pass a file argument to my bash script using a Terminal command in Linux? At the moment I'm trying to make a program in bash that can take a file argument from the Terminal and use it as a variable in my program. For example I run myprogram --file=/path/to/file in Terminal. My Program #!/bin...

google appengine datastore client

Is there a tool/client to view inside and make queries for google appengine datastore? ...

How do you use Google Command Line to download all slides from a google presentation in png?

I have been able to download google docs using something like this - google docs get --title "Shopping list" output.png or google docs get --title "Shopping list" output format=png Even though Shopping list has 2 slides, i only get the first one. Any ideas on what I am doing wrong here? ...

How to get Maven project version to the bash command line

Previous I issued a question on how to change Maven project vesion from command line which lead me to a new issue. Previously I was able to get the version number since the version was stored as a property that was easy to grep and parse from the command line (bash). Now that the pom.xml element is used for this, it no longer is unique...

What's the most efficient way to get a sorted, human-readable du output on Mac OS 10.6?

I used to have this sweet alias for du I called dusort that would print out a human-readable list of sizes for the top-level subdirectories+files sorted by size. It was like a mini-filelight for mac that runs in terminal. But now my alias is broken after I copied it to my new mac running Mac OS 10.6. Apparently the sort I used either ca...

Shell script : how to output to command line ?

I'm making a shell script and I want to know if it's possible to write directly to the command line when the script is executed ? Example : user@localhost:/home/user$./script.sh ... output ... another output ... another output ... last output user@localhost:/home/user$I want to write here on the command line I don't want to "echo" so...

Program a Dos File to execute a command line Run

The Command Line entry is: eraserl.exe -recycled It is needed to run "Eraser" ( http://eraser.heidi.ie/ ) in order to overwrite the Recycle Bin when no Recycle Bin Icon is available. How do I run this command from a DOS file (.bat, .cmd or .whatever)? (BTW, installing a lost Recyckle Bin is no easy trick!) Thank you ...

WCAT gives error: "must specify at least one of the following parameters -run, -update, -terminate, -showclients or -setclients"

When running WCAT on my windows XP machine via the commandline I get the following error: error: must specify at least one of the following parameters -run, -update, -terminate, -showclients or -setclients The command I try to run is: wcat.wsf -terminate -run -t scenario.wcat -f settings.ubr -s localhost -singleip -x And is...

How to remove a line from a manifest file inside a jar, from the command line?

Hi, i need to remove a line from the MANIFEST.MF inside a jar, I tried extracting it and generating a new manifest and using jar umf to put it inside again, but it not worked and the line is still inside the jar. I do not want to rebuild the jar and neither do it manually using 7-zip, there are many files that I need to remove the exact ...

How do I get the line and error type when performing a php lint check?

When I run $ php -l /path/to/script.php it will report whether an error occurs or not, but won't indicate the line or error type when an error does occur. Is there a better command line tool for lint checking or another way to get more error information? Thanks ...