1
голосов
4ответов
2942 просмотров

Looking for recommendations on a good ** beginners ** bash tutorial

I am an ETL developer by profession that just started reading The Pragmatic Programmer by Dave Thomas & Andrew Hunt. I have been meaning to learn more about bash & command line in Ubuntu for a while but reading this book made me realize how essential it is for me to start learning it. The...

12
голосов
2ответов
16659 просмотров

How to output lines 800-900 of a file with a unix command?

I want to output all lines between a and b in a file. This works but seems like overkill: head -n 900 file.txt | tail -n 100 My lack of unix knowledge seems to be the limit here. Any suggestions?

11
голосов
2ответов
13845 просмотров

How do I recognize command-line parameters in my Delphi program?

I plan to run specific application commands every X days using Task Scheduler. Do I have to write support for command-line parameters first, so Scheduler can execute it? If so, does anyone know any good command-parameter components?

1
голосов
3ответов
1971 просмотров

Running a command in shell script

I have a shell script file (run.sh) that contains the following: #!/bin/bash %JAVA_HOME%/bin/java -jar umar.jar when i try to run it (./run.sh), it gives me following: umar/bin/run.sh: line 1: fg: no job control However if I run same command directly on shell, it works perfectly. What's wr...

1
голосов
3ответов
544 просмотров

How can I add the "--watch" flag to this TextMate snippet?

I love TextMate as my editor for all things web, and so I'd like to use a snippet to use it with style.less files to automatically take advantage of the .less way of compiling .css files on the fly using the native $ lessc {filepath} --watch as suggested in the less documentation (link) My (t...

2
голосов
2ответов
4450 просмотров

How to create Cron job to backup MySQL and FTP backup to my backup server?

I want to setup a cron job to run so that it will automatically backup my MySQL database, while the database is running, and then FTP that backup to my backup server. I assume I can do this using a bash script. Anyone know of a good way to accomplish this? Thanks in advance.

7
голосов
1ответов
4725 просмотров

Using diffstat with subversion?

Could anyone give me examples, how I could use diffstat with subversion? I mean, using diffstat to analyze and produce statistics about one or multiple commits. NOTE: Linux commandline examples are OK ;)

16
голосов
4ответов
7804 просмотров

How to get NO context when using svn diff

When I use 'svn diff' from the command line, it prints out the lines that have changed but also the 3 unchanged lines before and after for context. I much prefer seeing only the changed lines with no context. I haven't been able to determine any command line options that will let me make it behav...

25
голосов
6ответов
23544 просмотров

Bash and filenames with spaces

The following is a simple Bash command line: grep -li 'regex' "filename with spaces" "filename" No problems. Also the following works just fine: grep -li 'regex' $(<listOfFiles.txt) where listOfFiles.txt contains a list of filenames to be grepped, one filename per line. The problem occu...

2
голосов
7ответов
4051 просмотров

How do I get the command-line parameters for certain button clicks in a application?

I want to start a program using Delphi code, and "command" it to perform an action, in this case a button click. I know you can start a program using the command line, but I would need the right paramaters for the button click. How or where can I find it?

0
голосов
2ответов
379 просмотров

PHP is displaying my source code?

I just upgraded to php5.3 and when I execute: php myfile.php I see the source code for myfile.php. Any idea why this is happening? I've never seen anything like it before!

4
голосов
1ответов
2956 просмотров

OSX: Launching multiple instances of an app and passing them command line args

There is a program I need to launch multiple times and pass it different arguments each time. To do this I tried writing a simple python script as follows: import sys, os from os.path import join # This works, but will not launch twice os.system('./AppName.app -AppCommandLineArg') # This allow...

16
голосов
11ответов
49000 просмотров

How to play audio file on windows from command line?

In Windows, is there a simple way (i.e. something you could type on a single command line) to just play a couple of .mp3 files and then exit on its own? wmplayer, for example, does not seem to exit when finished, forcing the harried user to hunt it down and click it closed every time. (wmplaye...

0
голосов
3ответов
747 просмотров

Copying a Directory Tree File by File

My advisor frequently compiles a bunch of software into his /usr/local and then distributes his /usr/local as a tarball. I then extract the tarball onto our lab machines for our use. Until now, this has worked fine, we just replace the old /usr/local with the contents of the tarball. But I have ...

17
голосов
2ответов
6141 просмотров

Wrapping an interactive command line application in a Python script

I am interested in controlling an interactive CLI application from Python calls. I guess at the most basic level I need a Python script that will start a CLI application on the host operating system. Pipe anything from standard input to the CLI application, and then pipe any output from the CLI a...

0
голосов
1ответов
181 просмотров

How can I hide the command prompt in my FWT application?

I'm creating an FWT application in Fantom, and every time I run my application, the MS-DOS command prompt window appears (as well as my main application form). I don’t want this MS-DOS window to be shown. How can I get rid of it?

6
голосов
2ответов
797 просмотров

Can the Spring Framework be used for batch applications?

My company is switching to Spring for our Java framework, and from what I understand it will work well for that, but we also have many Java batch applications*. Does Spring have adequate support for running batch applications? What features of spring will be useful in this environment, and won'...

0
голосов
1ответов
155 просмотров

How to force a confirmation step before certain perforce command?

I am new to Perforce. Is it possible in P4 to have a confirmation step before using some deletion command. E.g.: deleting a workspace has no confirmation step ( P4 client -d workspace_name ) deleting label has no confirmation step ( P4 label -d label_name) Which I found dangerous. Thanks,...

4
голосов
3ответов
3196 просмотров

Handle special characters in bash for...in loop

Suppose I've got a list of files file1 "file 1" file2 a for...in loop breaks it up between whitespace, not newlines: for x in $( ls ); do echo $x done results: file 1 file1 file2 I want to execute a command on each file. "file" and "1" above are not actual files. How can I do that if ...

34
голосов
4ответов
23159 просмотров

Can ImageMagick return the image size?

I'm using ImageMagick from the command line to resize images: convert -size 320x240 image.jpg However, I don't know how to determine the size of the final image. Since this is a proportional image scale, it's very possible that new image is 100x240 or 320x90 in size (not 320x240). Can I call ...

1
голосов
2ответов
1326 просмотров

IMAP folders diff?

I'd like to "diff" two IMAP folders (on two different servers) to compare spam filters, I'd like to have a command line tool (linux) to get just the headers (not the whole dir, e.g. using 'isync' or similar), something like this: $ imapget --subjects -p=password [email protected] or this: $ imapget ...

4
голосов
2ответов
4015 просмотров

Run firefox addons command-line

I am working 508 accessible standard for a website. There are a Firefox plugin to help check on each page a website WAVE addons I am having a crawler that walk throught all pages of the website. Now i want to combine WAVE addons + my crawler to check website as 508 accessibility compliance automa...

0
голосов
2ответов
280 просмотров

How to execute a command line from php

I need to convert the html file into PDF, I am having command line for this process C:\Program Files\Software602\Print2PDF/print2pdf.exe /iniconvert C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/BPO/Praveen/OCT_08/html_files/file.ini This is the command line to convert. But i do...

168
голосов
3ответов
71155 просмотров

How do I forward parameters to other command in bash script?

Inside my bash script, I would like to parse zero, one or two parameters (the script can recognize them), then forward the remaining parameters to a command invoked in the script. How can I do that?

5
голосов
3ответов
12071 просмотров

NSTask or equivalent for iPhone

I've an open source project (gdal) that I want to compile and run as part of an iOS app. I had been expecting to use NSTask but I see now that it was removed in iOS 3.0. I've also seen elsewhere that running external applications, though this would be a resource in my app's bundle, is not allowed...

0
голосов
5ответов
1303 просмотров

Sending the output of a command-line perl script to the browser via mod_perl

I have a plain perl script that can be run from the command-line via perl -w test.pl. I then have a mod_perl2 script that can be accessed from a web browser. I want to have the latter call the former and send the output to the browser, flushing as it goes. The mp2 script doesn't have a shebang l...

0
голосов
1ответов
1584 просмотров

Can not make a tag in SVN repo from command line

What I want to do: I have checked out WC in current folder ("App", which is not SVN repository folder), sources were built and I want to make a tag in repository based on revisions in my WC I run the following command (in "App" folder) "C:\Program Files\CC\server\svn\svn.exe" copy . https://svns...

1
голосов
3ответов
1207 просмотров

Can I run JUnit 4 to test Scala code from the command line?

If so, how? I haven't come across the proper incantation yet. If not, what's the best approach to unit-testing Scala code from the command line? (I'm a troglodyte; I use IDEs when I have to, but I prefer to play around using Emacs and command-line tools.)

35
голосов
3ответов
40367 просмотров

The best CLI parser for Java

What CLI parser for Java is easy to use and more scalable than others?

7
голосов
5ответов
51569 просмотров

CMD Script: How to close the CMD

I have created a small command that will let me launch Internet Explorer. However, I wish to close the small command prompt that shows up when I launch IE. How can I do this? This is my current code: "%ProgramFiles%\Internet Explorer\iexplore.exe" http://localhost/test.html PAUSE I am guessing...