Search Results

Search found 22668 results on 907 pages for 'command prompt'.

Page 67/907 | < Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >

  • Bash preexecute

    - by Alex_Bender
    I'm trying to write bash command wrapper, which will be patch bash current command on the fly. But i'm faced with the problem. As i'm not a good Shell user, i can't write right expression of variable assignment in string. See bellow: I'm set trap to preexecute, through this: alex@bender:~$ trap "caller >/dev/null || xxx \"\${BASH_COMMAND}"\" DEBUG; I want change variable BASH_COMMAND, do something like BASH_COMMAND=xxx ${BASH_COMMAND} but i don't know, how i need escaping variables in this string NOTE: xxx -- my custom function, which must return some value, if in end of command situated word teststr function xxx(){ # find by grep, if teststr in the end `echo "$1" | grep "teststr$" >/dev/null`; # if true ==> do if [ "$?" == "0" ]; then # cut last 6 chars (len('teststr')==6) var=`echo "$1" | sed 's/......$//'`; echo "$var"; fi } How can i do this stuff?: alex@bender:~$ trap "caller >/dev/null || ${BASH_COMMAND}=`xxx $BASH_COMMAND`" DEBUG;

    Read the article

  • Mapped commands in VIM starting with a Comma

    - by Boldewyn
    In my .vimrc, I defined this line: map ,ps <Esc>:!ps<Space>-a<CR> The mapping is set (which I controlled via :verbose map ,ps while inside vim). There is nothing else mapped to the comma. However, if I type the command in command mode, nothing is displayed in the status bar, the comma is ignored, the p movement and the s insert are triggered. (I.e., VIM reacts, as if there was no command ,ps.) Is there any magic that I have overlooked in enabling comma-started mapped commands?

    Read the article

  • How do you configure ConEmu to run cmd.exe as an Administrator from an Explorer integration?

    - by bentayloruk
    I am trying to add a ConEmu Here - Explorer context menu integration entry for the Visual Studio 2012 command prompt. I want the shortcut to Run as Administrator. I am not sure of the right way to do this in ConEmu. I am using the following Command (which works but obviously not as Admin): cmd.exe /k ""C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\vcvarsall.bat"" x86 What is the correct way to configure ConEmu to run this as Administrator? If there is not a correct way, how should I adjust the command to make this work?

    Read the article

  • Create an alias in Windows XP

    - by Lord Torgamus
    Back in school, I used to have a .login file along the lines of alias ll = ls -l alias dir = ls -Fhl alias web = cd ~/public/public_www/development ... I'd like to do that sort of thing with my XP box here at work, but most of the resources I've found online seem fairly complicated and heavy-duty. Is there a way to do this that doesn't involve mucking about in the registry or running a large batch file? EDIT: My original reason for asking this was that I only need the command line for one command in one specific folder, and I wanted to be able to get to that folder quickly when I launched the command line. But the accepted answer for this question is so good that I decided to ask about my original issue as a separate question here.

    Read the article

  • How to install and Configure MTA on Linux [closed]

    - by Umair Mustafa
    I need to know which MTA's is better and simple to handle and configure in linux. As I need to run a script that will send me the output of that command whenever it will run using cron. Ok the case is this. Every day I have to manually check the Disk space of server which are more than 30 which is headache and have to document that. So I will simply add the follwing command DF- H and the output of this command should be send on my email. So now IF u got the story then tell me what MTA is better sendmail, postfix and some instructions on HOW TO INSTALL and CONFIGURE it. And after configuring the How do I add the DF -H so that it will start seniding me the output on my email. Thanks in advance.

    Read the article

  • organizing images by resolution with batch files

    - by Anthony
    Doing some digging I'm trying to figure out a command line solution for organizing very large archives of images based on their resolution into folders, 1920x1080, 1600x1200, 1600x900, etc. I've come across a few post on Superuser mentioning something called ImageMagick, is that the best method to the madness I'm trying to accomplish? I've never used any command line functions/applets/tools other then those that come from Microsoft. I'm rather new to command line usage but ive been enjoying the hell out of it using Powershell, xcopy and robocopy. I am slowly trying to push myself further into the Linux world with Ubuntu running on one of my physical machines as well as a virtual machine so that's an option as well.

    Read the article

  • PHP Apache XAMPP Run Multiple Scripts from CLI in Background

    - by Pamela
    How can I simultaneously run dozens of PHP scripts in the background from XAMPP's command line interface? Someone suggested a batch file, but when I tried executing this: start php 1.php start php 2.php start php 3.php It only opened a command prompt window; I closed that window, then two more command prompt windows opened up executing 2.php and 3.php. I want to run as many scripts as I want all simultaneously and all in the background. What is the best way to accomplish this, and how can it be done?

    Read the article

  • Executing EXE with wildcard from psexec

    - by Danny
    I'm writing a few scripts that I am using to integrate with bamboo for some continuous integration improvements and I've run into a bit of a snag. I'm currently trying to run a psexec command that installs the latest build on the remote machine but I dont necessary know the revision number. For example, the remote exe file could be Installer-3.1.xxxxx.exe where the xxxxx changes. I tried running the command with Installer-3.1.*.exe but it takes it as literal in Windows. I'm not overly familiar with Windows command prompt and am more used to Linux at this moment.

    Read the article

  • powershell run java process problem

    - by Limited Atonement
    Dear Sirs, I'm trying to run a java process via Powershell in Windows XP. Here's the command: java.exe -cp .;./common.jar -Dcontext=atest1 -Dresourcepath=. DW_Install So, the classpath is . and .\common.jar (I think java takes the wrong slashes, right?) There are two environment variables, one "atest1" the other "." and the class to execute main on is DW_Install (in the default package). This command works in cmd.exe, but doesn't is PS. What's going on? What is PS doing while parsing this command that CMD doesn't do (or vice versa)? Aaron

    Read the article

  • Replace special text with sed?

    - by user143822
    I'm using CMD on Windows Xp to replace special text with Sed. I'm using this command for replace special characters like $ or * : sed -i "s/\*/123/g;" 1.txt But how command must i use to replace this strings with ciao! in my text files? Is possible? \\ \\\ "" sed.exe -i "s/{\*)(//123/ sed -i "s/\\/123/g;" 1.txt the previous command does not work because i have \, " and other special strings that sed use to make regex.

    Read the article

  • cd (change directory) to my home directory on Windows [closed]

    - by deostroll
    Possible Duplicate: Is there a short cut command in Windows command prompt to get to the current users home directory like there is in Linux? Any short way to cd to the user specific directories in the command prompt. Like for e.g. in linux shell (debian based) we do a cd ~ and it instantly takes to the current logged user's directory /home/<username>. Anything to this effect on windows? ps: currently trying to do this on xp machines. If it differs for other machines, mention that too.

    Read the article

  • Is there a way to catch cmd.exe windows into tabs?

    - by user55542
    I use an editor that allows me to type in a command to run. In order to see the output without having to redirect it to a file, I precede the command with "cmd /k," which leaves an open cmd.exe window. So I'd like to find a way to move catch the call to cmd.exe and give it to an application that tabifies cmd.exe, a terminal emulator as it's called. The desired result would be similar to what happens in a tabbed editor, when that editor is to open some file, it does so in another tab, and not in another window. While in a given situation it may be easier to modify the command to redirect output to display in the editor itself, in general it would be more helpful if I could find a way to catch all such calls into one window.

    Read the article

  • Is there a BSD equivalent to "!!"?

    - by CT
    I often find myself issuing a command that I do not have the proper elevated privileges for. On Ubuntu I could use sudo !! This would issue the same command with sudo privlidges. Is there an equivalent on OpenBSD? Edit: I should have been more specific on what version of OpenBSD. I am using OpenBSD 4.8 where sudo seems to be installed by default. I have already created a user besides root and edited my sudoers file to allow for that user to use sudo. My question is, is there already a built-in shortcut for the "!!" to use previous command.

    Read the article

  • Directories will list, but are not recognize by cd

    - by mdimond
    New to terminal and having problems out of the gate. Using Terminal 2.1.2 on a Mac running 10.6.8. Using the "ls Documents" will list the contents, but when I try to change directories, which I tried several different ways, I get the following results: new-host-2:~ MDimond$ cd. -bash: cd.: command not found new-host-2:~ MDimond$ cd./Users/MDimond/Documents -bash: cd./Users/MDimond/Documents: No such file or directory new-host-2:~ MDimond$ cd. /Documents -bash: cd.: command not found The /usr/bin has the cd command listed; the /bin does not. Any assistance would be greatly appreciated. Thanks, md

    Read the article

  • Why does FIND on Windows 7 give an "Access Denied" error?

    - by rann
    Hi All, I have an administrator account on a Windows 7 x64 machine. It is not THE administrator account, the account is simply a member of the administrators group. The install is default. When the user opens a command prompt it ends up in the users' %HOMEPATH% directory where you'll find various directories like the Documents folder. If the user uses the following (windows) FIND command, an "Access Denied" error occurs: FIND /I "My String" C:\Users\Rann\Documents Access denied - C:\USERS\RANN\DOCUMENTS Using runas or right-clicking on the command prompt to run it as an administrator does not change this behaviour; an administrator-level cmd.exe still gives me the same error. Changing the path to any other directory gives the same error. My question is thus: How is one supposed to use the FIND (and possibly other) commands? What rights are needed?

    Read the article

  • Ubuntu 10.04 Server on Hyper-V Server R2 has sluggish install and command line

    - by Paul Hobart
    I've installed Ubuntu Server 10.04 (64 bit) on a Hyper-V Server R2. I've encountered two issues that I think are related: Very slow install Very slow command prompt The text-mode installer goes through a series of text-based prompt windows. It takes 7-10 seconds for each of these windows to draw on the screen. The end result is that every time I answer a prompt and hit enter I wait for 15 seconds while the screen redraws line by line. I can literally see each line of text being drawn (like the old 300 baud modems days). Once done installing, scrolling on the command line is super slow. For instance, if a simple command, like "ls", causes the screen to scroll, it will scroll very slowly. This happens on a fresh install. The server functions as a LAMP server and an OpenSSH server, but that's it (I don't even have any Virtual Hosts set up yet). AND this only happens on the Virtual Machine console. I access the console through Hyper-V Manager and don't have this problem on any of my other Virtual Machines. Also, this problem does NOT happen when accessing a shell through OpenSSH. How can I improve this performance issue?

    Read the article

  • Running a command that produces no output with SharpSSH

    - by Paolo Tedesco
    I want to run a command using ssh. I am using the SharpSSH library, as in this example: using System; using Tamir.SharpSsh; class Program { static void Main(string[] args) { string hostName = "host.foo.com"; string userName = "user"; string privateKeyFile = @"C:\privatekey.private"; string privateKeyPassword = "xxx"; SshExec sshExec = new SshExec(hostName, userName); sshExec.AddIdentityFile(privateKeyFile, privateKeyPassword); sshExec.Connect(); string command = string.Join(" ", args); Console.WriteLine("command = {0}", command); string output = sshExec.RunCommand(command); int code = sshExec.ChannelExec.getExitStatus(); sshExec.Close(); Console.WriteLine("code = {0}", code); Console.WriteLine("output = {0}", output); } } My problem is that when the command I run produces no output, I get -1 as return code, instead of the code returned by the command on the remote machine. Has someone encountered this problem, or am I doing something wrong?

    Read the article

  • Usage of putty in command line from Hudson

    - by kij
    Hi, I'm trying to use putty in command line from an hudson job. The command is the following one: putty -ssh -2 -P 22 USERNAME@SERVER_ADDR -pw PASS -m command.txt Where 'command.txt' is a shell script to execute in the server through SSH. If i launch this command from the Window command prompt, it works, the shell script is executed on the server machine. If i launch a build of the hudson job configured with this batch command, it doesn't work. The build is running... and running... and running.. without doing anything, and i have to stop it manually. So my question is: Is it possible to launch an external programm (i.e. putty) from an hudson job ? ps: i tried SSH plugin but... not a really good plugin (pre/post build, fail status of the commands launched not caught by hudson, etc.) Thanks in advance for your help. Best regards. kij EDIT: These are the build logs: [workspace] $ cmd /c call C:\WINDOWS\TEMP\hudson7429256014041663539.bat C:\Hudson\jobs\Artifact deployer\workspace>putty -ssh -2 -P 22 USER@SERV_ADD -pw PASS -m com.txt Le build a été annulé Finished: ABORTED And the Hudson.err.log file at the same time (after a stop): 3 juin 2010 18:27:28 hudson.model.Run run INFO: Artifact deployer #6 aborted java.lang.InterruptedException at java.lang.ProcessImpl.waitFor(Native Method) at hudson.Proc$LocalProc.join(Proc.java:179) at hudson.Launcher$ProcStarter.join(Launcher.java:278) at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:83) at hudson.tasks.CommandInterpreter.perform(CommandInterpreter.java:58) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:19) at hudson.model.AbstractBuild$AbstractRunner.perform(AbstractBuild.java:601) at hudson.model.Build$RunnerImpl.build(Build.java:174) at hudson.model.Build$RunnerImpl.doRun(Build.java:138) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:416) at hudson.model.Run.run(Run.java:1241) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:46) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:124) My shell script only write "hello" in a "hello.txt" file on the server, and nothing is done.

    Read the article

  • Graceful DOS Command Error-Handling

    - by Captain Obvious
    PHP 5.2.13 on Windows 2003 I am using the DOS Start /B command to launch a background application using the PHP popen() function: popen("start /B {$_SERVER['HOMEPATH']}/{$app}.exe > {$_SERVER['HOMEPATH']}/bg_output.log 2>&1 & echo $!", 'r'); The popen() function launches a cmd.exe process that runs the specified command; however, if the command fails (e.g. the {$app}.exe doesn't exist or is locked in the above example), the cmd.exe process never returns, and PHP hangs indefinitely as a result. Calling the failing DOS command directly using the Command Prompt results in an Error prompt that requires clicking the OK button. I assume this error confirmation requirement is what's preventing the cmd.exe process from returning to PHP both from the Command Prompt (using both CGI and CLI) and the web (using Apache 2.0 handler w/Apache 2.2). Is there a way to write the DOS command or configure the server or cmd.exe app itself to return the DOS error to the originating call rather than waiting for confirmation?

    Read the article

  • Use of putty in command line

    - by kij
    Hi, I'm trying to use putty in command line from an hudson job. The command is the following one: putty -ssh -2 -P 22 USERNAME@SERVER_ADDR -pw PASS -m command.txt Where 'command.txt' is a shell script to execute in the server through SSH. If i launch this command from the Window command prompt, it works, the shell script is executed on the server machine. If i launch a build of the hudson job configured with this batch command, it doesn't work. The build is running... and running... and running.. without doing anything, and i have to stop it manually. So my question is: Is it possible to launch an external programm (i.e. putty) from an hudson job ? ps: i tried SSH plugin but... not a really good plugin (pre/post build, fail status of the commands launched not caught by hudson, etc.) Thanks in advance for your help. Best regards. kij

    Read the article

  • IE9 Error: There was a pr?blem sending the command to the program

    - by HK1
    I'm working on a new/fresh Windows 7 32bit machine that now has IE9 installed. The user is using the Dell Stardock application as his primary "desktop" (all his links there). When we place an internet link there and click on it we get the following error message: There was a problem sending the command to the program. To me this indicates that IE9 is having trouble going to the website we want to go to, which should get passed as a parameter to the browser when it opens. I don't think this is a StarDock/ObjectDock problem because we also have some other problems with internet links. For example, we cannot move an internet link from the Desktop to the Quick Launch on the task bar. When we do try, it forces us to put the link with the IE icon as part of the IE menu instead of allowing us to have a shortcut there as it's own entry. I should mention however, that links on the desktop and in the taskbar do work as we expect them too (without showing the above error message). It appears that this problem started after installing Windows Updates. Since we installed a whole bunch of updates at once I have no idea which one caused the problem. I did have Google Chrome installed but I uninstalled it since the user wants to use IE. The problem started before I uninstalled Chrome. I also reset the browser settings on IE9. It didn't help. Next I uninstalled IE9 which took me back to IE8. This actually did resolve the problem but the problem came back as soon as I installed IE9 again. We have Verizon Internet Security installed. It's actually a McAfee product rebranded to look like Verizon. I'm not real crazy over this software but the customer has a subscription so we're not planning to change it. I have no reason to believe that this is causing the problem and yet I know that security software is often to blame for strange issues. I've looked at the registry settings for the following keys and everything appears to be ok for every single one of them: HKEY_CLASSES_ROOT\.htm HKEY_CLASSES_ROOT\.html HKEY_CLASSES_ROOT\http\shell\open\command HKEY_CLASSES_ROOT\http\shell\open\ddeexec\Application HKEY_CLASSES_ROOT\https\shell\open\command HKEY_CLASSES_ROOT\https\shell\open\ddeexec\Application HKEY_CLASSES_ROOT\htmlfile\shell\open\command HKEY_CLASSES_ROOT\Microsoft.Website\Shell\Open\Command Edit1: I've found two potential solutions but I won't be able to try them until tomorrow. One is to disable the "Windows Font Cache" service. Another is to clear IE cache and browsing history. I won't be able to try out either solution until tomorrow since this is a remote client's machine. I see there are lots of other suggestions online but if you take the time to read them through you'll see that the other suggestions didn't fix the problem.

    Read the article

  • can a python script know that another instance of the same script is running... and then talk to it?

    - by Justin Grant
    I'd like to prevent multiple instances of the same long-running python command-line script from running at the same time, and I'd like the new instance to be able to send data to the original insance before the new instance commits suicide. How can I do this in a cross-platform way? Specifically, I'd like to enable the following behavior: "foo.py" is launched from the command line, and it will stay running for a long time-- days or weeks until the machine is rebooted or the parent process kills it. every few minutes the same script is launched again, but with different command-line parameters when launched, the script should see if any other instances are running. if other instances are running, then instance #2 should send its command-line parameters to instance #1, and then instance #2 should exit. instance #1, if it receives command-line parameters from another script, should spin up a new thread and (using the command-line parameters sent in the step above) start performing the work that instance #2 was going to perform. So I'm looking for two things: how can a python program know another instance of itself is running, and then how can one python command-line program communicate with another? Making this more complicated, the same script needs to run on both Windows and Linux, so ideally the solution would use only the Python standard library and not any OS-specific calls. Although if I need to have a Windows codepath and an *nix codepath (and a big if statement in my code to choose one or the other), that's OK if a "same code" solution isn't possible. I realize I could probably work out a file-based approach (e.g. instance #1 watches a directory for changes and each instance drops a file into that directory when it wants to do work) but I'm a little concerned about cleaning up those files after a non-graceful machine shutdown. I'd ideally be able to use an in-memory solution. But again I'm flexible, if a persistent-file-based approach is the only way to do it, I'm open to that option. More details: I'm trying to do this because our servers are using a monitoring tool which supports running python scripts to collect monitoring data (e.g. results of a database query or web service call) which the monitoring tool then indexes for later use. Some of these scripts are very expensive to start up but cheap to run after startup (e.g. making a DB connection vs. running a query). So we've chosen to keep them running in an infinite loop until the parent process kills them. This works great, but on larger servers 100 instances of the same script may be running, even if they're only gathering data every 20 minutes each. This wreaks havoc with RAM, DB connection limits, etc. We want to switch from 100 processes with 1 thread to one process with 100 threads, each executing the work that, previously, one script was doing. But changing how the scripts are invoked by the monitoring tool is not possible. We need to keep invocation the same (launch a process with different command-line parameters) but but change the scripts to recognize that another one is active, and have the "new" script send its work instructions (from the command line params) over to the "old" script.

    Read the article

< Previous Page | 63 64 65 66 67 68 69 70 71 72 73 74  | Next Page >