I would like to quickly send email from the command line. I realize there are probably a number of different ways to do this.
I'm looking for a simple way to do this from a linux terminal (likely a bash shell but anything should do) and an alternative way to do this on Windows. I want to be able to whip up an email right on the comman...
I have a set of base filenames, for each name 'f' there are exactly two files, 'f.in' and 'f.out'. I want to write a batch file (in Windows XP) which goes through all the filenames, for each one it should:
Display the base name 'f'
Perform an action on 'f.in'
Perform another action on 'f.out'
I don't have any way to list the set of ...
I'd like to keep a "compile-counter" for one of my projects. I figured a quick and dirty way to do this would be to keep a textfile with a plain number in it, and then simply call upon a small script to increment this each time I compile.
How would I go about doing this using the the regular Windows command-line?
I don't really feel li...
I would like to execute an OS command from my ruby script but I want to add an argument from a ruby variable.
I know that's possible by using keyword system like that :
#!/usr/bin/env ruby
directory = '/home/paulgreg/'
system 'ls ' + directory
but is that possible by using the "backquotes or backticks syntax" ?
(I mean by using that ...
For certain programs nothing beats the command line. Unfortunately, I have never seen good documentation or examples on how to write console applications that go beyond "Hello World". I'm interested in making console apps like Vim or Emacs. Well not exactly like Vim or Emacs but one that takes over the entire command prompt while it is...
We've got an interesting case where we are trying to determine how different instances of our app were launched. Is there any way for .NET to be able to query another running instance and get the command line parameters passed to that instance? I've not been able to find any way to do it in .NET so far, so I thought I'd check here to see...
We're currently building an application that executes a number of external tools. We often have to pass information entered into our system by users to these tools.
Obviously, this is a big security nightmare waiting to happen.
Unfortunately, we've not yet found any classes in the .NET Framework that execute command line programs whil...
.WTV is the new DVR-MR format for recorded TV-shows in the Vista Media Center with TV Pack 2008 installed. Since there is a bug in that TV Pack, not allowing to see the current playback posision within the MSAS COM State integration service, the only way to 'fix' the commercial skipping addin, is to convert the .WTV file into a .DVR-MR,...
I want to write a command that specifies "the word under the cursor" in VIM. For instance, let's say I have the cursor on a word and I make it appear twice. For instance, if the word is "abc" and I want "abcabc" then I could type:
:s/\(abc\)/\1\1/
But then I'd like to be able to move the cursor to "def" and use the same command to...
I'm working on a command line application for Solaris, written in Java6. I'd like to be able to scroll through a history of previous commands using the up and down arrows like many Unix tools allow (shells, VIM command mode prompt, etc).
Is there any standard way of achieving this, or do I have to roll my own?
...
I wrote a Haskell program that runs backup processes periodically on a Windows machine use rsync. But everytime I run the rsync command, a command window opens up to the top of all the windows. I would like to get rid of this window. What is the simplest way to do this?
...
I'm looking for a Windows port of the UNIX touch command. I don't want to install an entire MKS toolkit just for the one tool. Is there a native port available somewhere or a command in Windows that does the same thing and supports features like all files in a directory by wildcard?
Specifically I'm after changing mtime, ctime and atime...
I have up to 4 files based on this structure (note the prefixes are dates)
0830filename.txt
0907filename.txt
0914filename.txt
0921filename.txt
I want to open the the most recent one (0921filename.txt). how can i do this in a batch file?
Thanks.
...
Is there a command equivalent to 'ps' on Unix that can list all processes on a Windows machine?
...
If you are writing a program that is executable from the command line, you often want to offer the user several options or flags, along with possibly more than one argument. I have stumbled my way through this many times, but is there some sort of design pattern for looping through args and spinning off the appropriate functions?
Consid...
Is it possible to change the hostname in Windows 2003 from the command line with out-of-the-box tools?
...
I would like to be able to embed a command line interpreter inside a dockable window in Visual Studio. Is there any nice way to do this?
...
To create a playlist for all of the music in a folder, I am using the following command in bash:
ls > list.txt
I would like to use the result of the pwd (print working directory) command for the name of the playlist.
Something like:
ls > ${pwd}.txt
That doesn't work though - can anyone tell me what syntax I need to use to do somet...
I am writing a batch file script using Windows command-line environment and want to change each occurrence of some text in a file (ex. "FOO") with another (ex. "BAR"). What is the simplest way to do that? Any built in functions?
...
The easiest way to think of my question is to think of a single, simple unix command (albeit, this is for windows) and I need progmatic access to run it.
I have a single command-line based executable that performs some unit of work. I want to call that executable with the .net process library, as I can do with any other executable.
Ho...