command-line

Syntax error only when command is run from cron

Hi folks, This command: /usr/bin/mysqldump --add-drop-table -u myuser -pmypass mydb > "/home/myuser/dbBackups/"`date +%Y%m%d`".sql" works fine from the command line but whenb cron runs it I get /bin/sh: -c: line 0: unexpected EOF while looking for matching ``' /bin/sh: -c: line 1: syntax error: unexpected end of file The command i...

How to run GUI2Exe from command line?

I'm using GUI2Exe to CX_freeze my python app, which is working great... if I want to build it manually. My next step is to automate this build, so I can build in one step Is there a way to use the exported setup.py to build? or to call GUI2Exe with some command line parameters to build the project? Thanks! Update: So I ran the...

Command-line interface or PowerShell?

If you were to make a tool that: sys-admins would use (e.g. system monitoring or backup/recovery tools) has to be script-able on Windows Would you make the tool: A command-line interface tool? PowerShell cmdlet? GUI tool with public API? I heard PowerShell is big among sys-admins, but I don't know how big compared to CLI tools. ...

VS2010 & SourceSafe 2005 - Logging into SourceSafe from the command line?

Hi, I have a custom application which brings together several resources and builds a Visual Studio project into an exe file I can then use to upgrade my company's website and database. This custom app uses System.Diagnostics.Process in a couple of places to access SourceSafe, I use the command SS ... -Y, to log into SourceSafe and proce...

How to sort files numerically from linux command line

Okay, now this is more a rant about Linux than a question, but maybe someone knows how to do what I want. I know this can be achieved using the sort command, but I want a better solution because getting that to work is about as easy as writing a C program to do the same thing. I have files, for arguments sake, lets say I have these file...

How to launch PowerShell script from the OS command line?

I have a PowerShell script for building my project files, and I'd like to have capability to run it from my file manager's command line (and, possibly, make a shortcut to this script so I can start build from my desktop) Any way to do this? ...

Prevent a user from closing an application that is opened through a C# program

I have a old command line based program (its fortran if that matters) that is opened from a C# application when a user clicks a button. If the command line program is shut down while it is running data becomes corrupted. Is there any way to prevent people shutting it down while it is running? Like make the [x] not be available or some...

Looking for a smart command-line tool in Linux which can generate xsd out of xml.

I can also settle for a web-based interface, but a good command-line tool is preferable. Now, I have tried to use xsd.exe that comes with mono-devel, but that skipped a whole bunch of stuff that was mentioned in the xml file. I understand that I will need to hand-tweak the output, but I do want something decent to start with. ...

GNU sed - find or replacing spaces or new lines. Why is this not working? v3.02 vs v4.2

C:\crp\cnp>sed -V GNU sed version 3.02 Copyright (C) 1998 Free Software Foundation, Inc....... C:\crp\cnp>type f.f a a a a a a Trying to replace 'a' with spaces. C:\crp\cnp>type f.f | sed -e s/a/\d032/g d032 d032 d032 d032 d032 d032 why isn't it working? I don't mind whether i'm finding or replacing spaces or new lines.. I ...

Remotely Locking Gnome Screen Through SSH

How would you lock the screen of an active X session, through an SSH connection? My test platform is Ubuntu 10.04. The command "gnome-screensaver-command --lock" works when run from inside the X session, but fails from the SSH session, presumably because SSH doesn't have immediate access to X. Is there a workaround? ...

Problems using teamcity command line to perform ssh remote login

I was wondering if anyone has tried using teamcity's command line builder to perform ssh remote login. Right now, I would like to automate some testing on a QNX neutrino OS which is currently unsupported by teamcity. As a work around, I setup a ssh server on the target qnx machine so i could ssh and sftp the executables in. Firstly, t...

Git: how to unpack packed-refs?

Hi. I cloned a project from github with git clone --mirror. That left me with a repository with a packed-refs file, a .pack and an .idx file. For developement purposes I want to look at the loose objects, so I unpacked the objects with git unpack-objects < <pack file> which worked fine (I unpacked the pack file into a new repo if you're...

FFMPEG/X264 how to use them together

Hey Guys Need a little help. I am trying to encode large videos using ffmpeg/x264. While x264 is totally unable to encode these videos to .mov, ffmpeg does a decent job. But I need to use one of the flags which x264 provides to encode my video. So is there a good way to encode large videos using x264 given that i only want .mov as out...

What does "java: No match." mean?

When running java from the command line: java -classpath bin:pellet-2.0.0/lib/* com.stuff.MyClass argumentTextStuff I'm getting the following reply: java: No match. What's this mean? which java points to the expected file. And if I take the asterisk out, then I get the expected class not found error. Google searches aren't fruitf...

How to run a command-line program on a remote server

I have written a tool that is run on the command line. I can test it on the command line on my machine, and it works fine. I then remote into the target server machine and run it on the command line there, and it still works. However...this tool needs to remain running (its a monitoring tool). I can't leave my remote session to that mac...

Accessing command line arguments in C

Hello, please forgive me if this is a noob question, but i'm a beginner at C, learning only for a while. I tried to write a program that sums up two numbers (provided as params to the application). The code is like this: #include <stdlib.h> #include <stdio.h> int main( int argc, char** argv) { int a = atoi(argv[0]); int b = atoi...

how to run MStest as Admin using a batch file

Dear All, I'm trying to run some automated test using a batch file. I have written all these test cases in VSTS 2008. When I run these test cases using VS IDE, it ran succesfully. But once I try to run my test case using a batch file, it throws error "System.ComponentModel.Win32Exception: The requested operation requires elevation." As...

regarding javac

javac is not internal or external command error is coming. I have set the path. then also it is giving the same error. ...

$PATH variable not properly set in gvim/MacVim when it is opened from the finder

I am using MacVim (basically gvim for the mac). If I open macvim from the command line then my $PATH variable will be properly set. If I open macvim via point and click with the finder, the $PATH variable will NOT be properly set. Can anyone give me some insight? Note: I know at least part of my path is set in ~/.bashrc, but ...

grep from bottom to top of a file

hi, what is the option with grep or egrep through which we can search from bottom to up of a file normally they works in the top to bottom ...