Search Results

Search found 24211 results on 969 pages for 'shell command'.

Page 15/969 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • How to clear current line of command prompt?

    - by JellicleCat
    How can I clear the current line in the command prompt? (I'm using Windows 7.) Too often, I enter a command, execute it, get many lines of output, then wish to enter another command. But before entering the second command, I press the up arrow key to review the first command, then I find I have to hold backspace for 30-or so characters. (I can't just press down again to get an empty line. Nor can I get it by pressing up again.)

    Read the article

  • Windows command FOR /F isn't working?

    - by Mark Ransom
    I'm trying to use the FOR command in Windows XP's command line. I have a file temp.txt with 3 lines: temp1 temp2 temp3 And I'm typing the following command at the prompt: for /F %p in (temp.txt) do echo Testing %p Nothing comes back. If I remove the /F parameter, the output is Testing temp.txt. As far as I can determine, I'm using the command exactly as it is documented by Microsoft. I've checked my registry to make sure Command Extensions are on, and even started a new shell with cmd /e:on to be doubly sure. What am I doing wrong? Yes, I was doing something wrong. The file temp.txt wasn't created from scratch, I just edited it to put in my test content. Unfortunately when I created the file the first time, I saved it with a UTF-8 marker at the front. Recreating the file as plain text solved the problem.

    Read the article

  • What is the role/responsibility of a 'shell'?

    - by Rune
    Hi, I have been looking at the source code of the IronPython project and the Orchard CMS project. IronPython operates with a namespace called Microsoft.Scripting.Hosting.Shell (part of the DLR). The Orchard Project also operates with the concept of a 'shell' indirectly in various interfaces (IShellContainerFactory, IShellSettings). None of the projects mentioned above have elaborate documentation, so picking up the meaning of a type (class etc.) from its name is pretty valuable if you are trying to figure out the overall application structure/architecture by reading the source code. Now I am wondering: what do the authors of this source code have in mind when they refer to a 'shell'? When I hear the word 'shell', I think of something like a command line interpreter. This makes sense for IronPython, since it has an interactive interpreter. But to me, it doesn't make much sense with respect to a Web CMS. What should I think of, when I encounter something called a 'shell'? What is, in general terms, the role and responsibility of a 'shell'? Can that question even be answered? Is the meaning of 'shell' subjective (making the term useless)? Thanks.

    Read the article

  • how to run multiple shell scripts in parallel

    - by tom smith
    I've got a few test scripts, each of which runs a test php app. Each script runs forever. So, cat.sh, dog.sh, and foo.sh, each run a php script, and each shell script runs the php app in a loop, so it runs forever, sleeping after each run. I'm trying to figure out how to run the scripts in parallel, and at the same time, see the output of the php apps in the stdout/term window. I thought, simply doing something like foo.sh > &2 dog.sh > &2 cat.sh > &2 in a shell script would be sufficient, but it's not working. foo.sh, runs foo.php once, and it runs correctly dog.sh, runs dog.php in a never ending loop. it runs as expected cat.sh, runs cat.php in a never ending loop *** this never runs!!! it appears that the shell script never gets to run cat.sh. if i run cat.sh by itself in a separate window/term, it runs as expected... thoughts/comments

    Read the article

  • Can I nest a command string within another command string?

    - by Zach L
    Whenever I run the following command in an elevated command prompt, I get the 0x80070005 Access Denied error code. I'm assuming it's a permissions error for the child shell. I'm running the command in an elevated prompt on Winddows 7 Pro SP1. FORFILES /P %WINDIR%\servicing\Packages /M Microsoft-Windows-InternetExplorer-* 9.*.mum /c "cmd /c echo Uninstalling package @fname && start /w pkgmgr /up:@fname /norestart" Can place the "Runas" command within the already nested command in order to run the child shell as an admin? I don't think I can because of conflicts with quotation mark locations. If there's another way to do this, such as via a batch file, I'm open to alternative methods, although I do prefer running it as a single string. Sidenote1: Ignore the space after the first asterisk in the command string. It was added one for aesthetics & accuracy. Sub-question: Could I use this "fix" to circumnavigate the problem entirely? Prompt as Administrator? Reference for Runas #1 Reference for Runas #2

    Read the article

  • Fake demostration software for command line

    - by Joe
    I'm looking for some software that would be useful for giving demonstrations. I regularly have to show the effects of scrips ect to classes while talking about their effects, and equaly regularly I have finger trouble and have to rewrite various commands - wasting class time and general energy. I'd like to be able to record a sequence of commands in advance, and then play them back at the speed of my choosing. So I might have a file that containes the commands: echo "hello world!" ls ls -l ls -l | sort I'd like to be able to play these commands back by typing similar ones in. So I'd have a blinking command prompt and if I typed 'echo "hxxx' the command prompt would read home$echo "hell and if I typed any other letters the terminal would fill up with the remainder of the command until I press enter, when it executes the command. The point is that even if I screw up the command when typing it, the command that I'd prepared in advance would be executed. My question is - does similar software exist for giving demonstrations? or even, is this an easy thing to script up...? EDIT - two quick things first of all I'm on osx - but it would be nice to get a general solution for other people who arrive here from google. and second a lot of the comments/answers are concentrating on, in effect, making it fast and easy to enter long commands by means of hotkeys and the like. Actually I'd like it to at least look like I'm typing live - that's why I put in the bit about the one-to-one keymapping, but I don't think I explained that quite as well as I could have...

    Read the article

  • Gnome-shell freezes. What to do to keep apps open, like "alt+f2 r" when GS works

    - by user94592
    This is a repost, because no one had popper solution. What to do when gnome-shell freezes? Everything works correctly (music is still playing etc.), just the gui freezes. I am able to ctrl+alt+f1. What can I do after logging in the ctrl+alt+f1 terminal, in order to restore gnome-shell? If gnome-shell worked, I'd just hit alt+f2 and run r. I usually end up sudo rebooting which I don't like, because I have to reopen apps.

    Read the article

  • Open a terminal window & run command, then close the terminal window if command completed successfully?

    - by Caspar
    I'm trying to write a script to do the following: Open a terminal window which runs a long running command (Ideally) move the terminal window to the top left corner of the screen using xdotool Close the terminal window only if the long running command exited with a zero return code To put it in Windows terms, I'd like to have the Linux equivalent of start cmd /c long_running_cmd if long_running_cmd succeeds, and do the equivalent of start cmd /k long_running_cmd if it fails. What I have so far is a script which starts xterm with a given command, and then moves the window as desired: #!/bin/bash # open a new terminal window in the background with the long running command xterm -e ~/bin/launcher.sh ./long_running_cmd & # move the terminal window (requires window process to be in background) sleep 1 xdotool search --name launcher.sh windowmove 0 0 And ~/bin/launcher.sh is intended to run whatever is passed as a command line argument to it: #!/bin/bash # execute command line arguments $@ But, I haven't been able to get the xterm window to close after long_running_cmd is done. I think something like xterm -e ~/bin/launcher.sh "./long_running_cmd && kill $PPID" & might be what I'm after, so that xterm is launched in the background and it runs ./long_running_cmd && kill $PPID. So the shell in the xterm window then runs the long running command and if it completes successfully, the parent process of the shell (i.e. the process owning the xterm window) is killed, thereby closing the xterm window. But, that doesn't work: nothing happens, so I suspect my quoting or escaping is incorrect, and I haven't been able to fix it. An alternate approach would be to get the PID of long_running_cmd, use wait to wait for it to finish, then kill the xterm window using kill $! (since $! refers to last task started in the background, which will be the xterm window). But I can't figure out a nice way to get the PID & exit value of long_running_cmd out of the shell running in the xterm window and into the shell which launched the xterm window (short of writing them to a file somewhere, which seems like it should be unnecessary?). What am I doing wrong, or is there an easier way to accomplish this?

    Read the article

  • From a shell script open a new tab in a specific instance of Firefox.

    - by toc777
    Hi everyone, I have a shell script that creates Firefox profiles and then uses them to open multiple instances of Firefox simultaneously. The problem is how can I open a URL in a particular instance of Firefox? I have tried firefox -CREATEPROFILE test firefox -P 'test' -no-remote firefox -P test -url www.google.ie But the last part which is trying to open the URL using the test profile does not work, it always opens in then default profile. Is there any way to tell Firefox from the command line to open a URL using a particular profile? Thanks.

    Read the article

  • Mapping a Piped Shell Command in Vim

    - by michaelmichael
    In a previous question I asked about mapping evaluated code to a new window in MacVim. I got a great solution, but it presented another question: How can I map a key command in my .vimrc that involves piping output in the shell? As a simple example, let's say I wanted to pipe the results of ls -a to a new MacVim window. From the Vim command line I can enter !ls -a | mvim -, and the results will appear in a new window. Great! Now, I add that to my .vimrc: nmap <Leader>r :w !ls | mvim<CR> Vim now throws an error every time I try to source my .vimrc, which reads as follows: E492: Not an editor command: mvim<CR> Any ideas on how to overcome this?

    Read the article

  • Python: Check existence of shell command before execution

    - by Gabriel L. Oliveira
    Hi all. I'm trying to find a way to check the existence of a shell command before its execution. For example, I'll execute the command ack-grep. So, I'm trying to do: import subprocess from subprocess import PIPE cmd_grep = subprocess.Popen(["ack-grep", "--no-color", "--max-count=1", "--no-group", "def run_main", "../cgedit/"], stdout=PIPE, stderr=PIPE) Than, if I execute cmd_grep.stderr.read() I receive '' like the output. But I don't have the command ack-grep on my path. So, why Popen is not putting the error message on my .stderr variable? Also, is there a easyer way to do what I'm trying to do?

    Read the article

  • How to secure svn+ssh checkout users?

    - by vvanscherpenseel
    All our SVN repositories are hosted on a dedicated machine on which all the developers have access. Every now and then we need to checkout a repository on a machine we don't own or operate ourselves. Currently we all use our own system (SSH) account for this, but instead I would like to use some generic 'checkoutsvn' user that can be used for this. This user is only used for checking out from a repository, but should not be allowed to log in to the system (no shell access). I tried to do this by setting the default shell of that account to /sbin/nologin but then SVN fails, as apparently svn+ssh requires shell access. How do you do this? Is there a good solution for this?

    Read the article

  • Auth failed running command from shell script

    - by CSchulz
    I try to run following command from shell script: svn checkout http://url/ --username user --password password --non-interactive --no-auth-cache . It fails always with following error: svn: OPTIONS of 'http://url/': authorization failed: Could not authenticate to server: rejected Basic challenge (http://url) Here the call out of my script: $(svn $command $url $auth --non-interactive --no-auth-cache .) Running the same command from the terminal works fine. What is the difference between running from shell script and terminal? EDIT: Here some version information: OS: Porteus 1.0 based on Slackware 13.3 Subversion: subversion-1.6.16-i486-1

    Read the article

  • How to write scripts that can run in bash and csh?

    - by Victor Liu
    I'm not sure if this is even possible, but is there a way to write shell scripts that can be interpreted by both the Bourne shell as well as C shell? I want to avoid simply checking for the shell and running a shell-specific code. If this is possible, are there any guides on how to do it? I have always written my scripts for Bourne shell syntax, and I know next to nothing about csh, so this may be a stupid question. I have Google'd for the differences between shells, but there is little information (as far as I can tell) on its implications for scripting.

    Read the article

  • Can the Visual Studio (2010) Command Window handle "external tools" with project/solution relative p

    - by ee
    I have been playing with the Command Window in Visual Studio (View-Other Windows-Command Window). It is great for several mouse-free scenarios. (The autocompleting file "Open" command rocks in a non-trivial solution.) That success got me thinking and experimenting: Possibility 1.1: You can use the Alias commands to create custom commands Possibility 1.2: You can use the Shell command to run arbitrary executables and specify parameters (and pipe the result to the output or command windows) Possibility 2: A previously setup external tool definition (with project-relative path variables) could be run from the command window What I am stuck on is: There doesn't appear to be a way to send parameters to an aliased command (and thus the underlying Shell call) There doesn't appear to be a way to use project/solution relative paths ($SolutionDir/$ProjectDir) on a Shell call Using absolute paths in Shell works, but is fragile and high-maintenance (one alias for each needed use case). Typically you want the command to run against a file relative to your project/solution. It seems you can't run the traditional external tools (Tools-External Tools...) in the command window Ultimately I want the external tool functionality in the command window in some way. Can anyone see a way to do this? Or am I barking up the wrong tree? So my questions: Can an "external tool" of some sort (using relative project/solution path parameters) be used in the Command Window? If yes, How? If no, what might be a suitable alternative?

    Read the article

  • If a command line program is unsure of stdout's encoding, what encoding should it output?

    - by mackstann
    I have a command line program written in Python, and when I pipe it through another program on the command line, sys.stdout.encoding is None. This makes sense, I suppose -- the output could be another program, or a file you're redirecting it into, or whatever, and it doesn't know what encoding is desired. But neither do I! This program will be used by many different people (humor me) in different ways. Should I play it safe and output only ascii (replacing non-ascii chars with question marks)? Or should I output UTF-8, since it's so widespread these days?

    Read the article

  • ip namespace non-root shell

    - by user2730940
    I am trying to run ssh command to another ip namespace. I can do it right now, but it runs as root. I want to run it as a normal user. I want to know if there is a way to enter a non-root shell in another network namespace. I know you can use this to enter a root shell in another namespace: sudo ip netns exec <namespace> bash Alternatively, is there a way to run single commands as a non-root user? I know you can run commands as root with this: sudo ip netns exec <namespace> <command>

    Read the article

  • iPhone Shell - is there any?

    - by alee
    While working on iphone security architecture, i came to know that i can run applications from other applications in iphone. referring to the following url http://iphonedevelopertips.com/cocoa/launching-other-apps-within-an-iphone-application.html for example, i can put a link in a website with following hyperlink skype:// will result skype to run and call at particular number. Now i have few concerns here. is there a shell running in background in iphone, so that it allows other application to run basic app commands. if the above statement is true then how can i enable or run commands directly into iphone shell? if above statements are false, then could you please explain how these commands are being executed? is this part of iPhone SDK? or this funcationality is iPhone OS

    Read the article

  • What's wrong with this bash prompt?

    - by takeshin
    I use the following entry in ~/.bashrc file to colorize the prompt and display current branch of git repository: PS1='\[\e[1;32m\]\[\u@\h\]\[\e[m\] \[\w\]\[\e[1;1m\]\[$(__git_ps1 " (%s)")\] \[\e[1;1m\]\[$\] \[\e[m\]' This works almost fine, except when I use bash history (up arrow key few times), the command line becomes 'outdented' (just the first characters of the prompt remains untouched), and the visible is: usemmand when my username is user and the command is command.

    Read the article

  • How to execute with /bin/false shell

    - by Amar
    I am trying to setup per-user fastcgi scripts that will run each on a different port and with a different user. Here is example of my script: #!/bin/bash BIND=127.0.0.1:9001 USER=user PHP_FCGI_CHILDREN=2 PHP_FCGI_MAX_REQUESTS=10000 etc... However, if I add user with /bin/false (which I want, since this is about to be something like shared hosting and I don't want users to have shell access), the script is run under 1001, 1002 'user' which, as my Google searches showed, might be a security hole. My question is: Is it possible to allow user(s) to execute shell scripts but disable them so they cannot log in via SSH?

    Read the article

  • chroot'ing SSH home directories, shell problem.

    - by Hamza
    Hi folks, I am trying to chroot my SSH users to their home directories and it seems to work.. in a strange way. Here is what I have in my sshd_config: Match group restricthome ChrootDirectory %h The permissions on the user directories looks like this: drwxr-xr-x 2 root root 1024 May 11 13:45 [user]/ And I can see that the user logs in successfully: May 11 13:49:23 box sshd[5695]: Accepted password for [user] from x.x.x.x port 2358 ssh2 (with no error messages after this) But after entering the password the PuTTY window closes down. This is a wild guess, but could it be because the user's shell is set to /bin/bash and it can't execute because of the chroot? If so, could you give me pointers on how to fix it? Would simply copying the bash binary into user's home directory and modyfying the shell work? How would I deal with the dependencies, ldd shows quite a few of those :) Comments/suggestions will be appreciated. Thanks.

    Read the article

  • Alternative shell apps for OS X

    - by Joseph Silvashy
    This might sound ridiculous, but my eyes are tired of looking at the crappy font rendering in OS X's Terminal.app, is there anything you guys recommend? I know it's like one of those things that you can easily say, "It's shell! what more can you ask for!" but really, all these great methods for rendering fonts and anti-aliasing, and we developers haven't even integrated that into our most trusty tool... at least that I know of. Anyhow, let's discus shell alternatives, thoughts?

    Read the article

  • jZip isn't integrating with Windows 7 shell

    - by Aayush
    I installed jZip in my new windows 7 64 bit OS. but it doesn't seem to integrate with the shell. It doesn't appear in the right click menu on any file(not even zip files). To zip a file I have to open jZip go to file-new and browse for the files and to extract compressed files I have to open the file in jZip then click on extract, there is no right click menu integration what so ever, although It used to have when I had jZip on the Windows 7 RC. I reinstalled checking the settings incase I made a mistake but I checked shell integration while installation. Don't know what it wrong? anyone know how I should solve this. Help..? Thanks!

    Read the article

  • Copy files from sub directories into one directory.

    - by Derek Organ
    Ok I have a bunch of files in this file structure format. /backup/daily/database1/database1-2011-01-01.sql /backup/daily/database1/database1-2011-01-02.sql /backup/daily/database1/database1-2011-01-03.sql /backup/daily/database1/database1-2011-01-04.sql /backup/daily/database1/database1-2011-01-05.sql /backup/daily/database1/database1-2011-01-06.sql /backup/daily/database1/database1-2011-01-07.sql /backup/daily/anotherdb/anotherdb-2011-01-01.sql /backup/daily/anotherdb/anotherdb-2011-01-02.sql /backup/daily/anotherdb/anotherdb-2011-01-03.sql /backup/daily/anotherdb/anotherdb-2011-01-04.sql /backup/daily/anotherdb/anotherdb-2011-01-05.sql /backup/daily/anotherdb/anotherdb-2011-01-06.sql /backup/daily/anotherdb/anotherdb-2011-01-07.sql /backup/daily/stuff/stuff-2011-01-01.sql /backup/daily/stuff/stuff-2011-01-02.sql /backup/daily/stuff/stuff-2011-01-03.sql /backup/daily/stuff/stuff-2011-01-04.sql /backup/daily/stuff/stuff-2011-01-05.sql /backup/daily/stuff/stuff-2011-01-06.sql /backup/daily/stuff/stuff-2011-01-07.sql And there are lots lots more. ultimately I want to import all the 2011-01-07.sql files into my mysql database. This works for one mysql -u root -ppassword < /backup/daily/database1/database1-2011-01-07.sql That will nicely restore that database from this backupfile. I want to run a process where it does this for all databases. So my plan is to first cp all 2011-01-07 sql files into a tmp dir e.g. cp /backup/daily/*/*2011-01-07*.sql /tmp/all The command above unfortunately isn't working I get an error: cp: cannot stat ..... No such file or directory So can you guys help me out with this. For bonus points if you can tell me how to do the next step which is import all databases in one command doing one at a time that would be great too. I really want to do these in two separate steps because I need to delete a few sql files manually from the tmp dir before I run the restore command. So I need: 1) command to copy all 2011-01-07 sql files to a tmp dir 2) command to import all those files in that dir into mysql I know its possible to do in one but for lots of reasons I really would prefer to do it in two steps.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >