Search Results

Search found 4958 results on 199 pages for 'shell'.

Page 6/199 | < Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >

  • shell script to start multiple Java programs from a directory at boot

    - by zcourts
    I'm not sure if this is the best approach to this, It's my first time doing all of this (including writing shell scripts). OS: Centos My problem: I want to start multiple shell scripts at boot. One of the shell scripts is to start my own services and 3 others are for third party services. The shell script to start my own services will be looking for jar files. I currently have two services (will change), written in Java. All services are named under convention prefix-service-servicename What I've done: I created the following directory structure /home/username/scripts init.sh boot/ boot/startthirdprtyservice1.sh boot/startthirdprtyservice2.sh boot/startthirdprtyservice3.sh boot/startmyservices.sh /home/username/services prefix-lib-libraryname.jar prefix-lib-libraryname.jar prefix-service-servicename.jar prefix-service-servicename.jar prefix-service-servicename.jar In init.sh I have the following: #!/bin/sh #This scripts run all executable scripts in the boot directory at boot #done by adding this script to the file /etc/rc.d/rc.local #nohup #run-parts /home/username/scripts/boot/* #for each file in the boot dir... # ignore the HUP (hangup) signal for s in ./boot/*;do if [ -x $s ]; then echo "Starting $s" nohup $s & fi done echo "Done starting bootup scripts " echo "\n" In the script boot/startmyservices.sh I have #!/bin/sh fnmatch () { case "$2" in $1) return 0 ;; esac ; return 1 ; } ##sub strin to match for SUBSTRING="prefix-service" for s in /home/username/services/*;do if [ -x $s ]; then #match service in the filename , i.e. only services are started if fnmatch "$SUBSTRING" "$s" ; then echo "Starting $s " nohup $s & fi fi done echo "Done starting Services" echo "\n" Finally: Usually you can stick a program in /etc/rc.d/rc.local for it to be run at boot but I don't think this works in this case, or rather I don't know what to put in there I've just learnt how to do this by reading up a bit so I'm not sure its particularly the best thing to do so any advice is appreciated. When I run init.sh nohup.out contains Starting the thirdparty daemon... thirdparty started... .... but nothing from myservices.sh and my Java services aren't running I'm not sure where to start debugging or what could be going wrong. Edit Found some issues and got it to work, used -x instead of -n to check if the string is none zero, needed the sub string check to also be if [[ $s = $SUBSTRING ]] ; then and this last one was just stupid, missing java -jar in front of $s Still unsure of how to get init.sh to run at boot though

    Read the article

  • command to show the shell command prompt

    - by LinuxPenseur
    Hi, Is there a shell command to display the command prompt. I will explain what i want through the illustration below. When i execute script.sh, i should get the following output $sh script.sh $ /* command prompt and then print hi */ hi My script.sh is like this #! /bin/bash <command to display the shell command prompt> echo "hi" exit 0 what should the code that has to go in the place of angle brackets to get an output like above? Thanks

    Read the article

  • command to show the shell command prompt

    - by LinuxPenseur
    Hi, Is there a shell command to display the command prompt. I will explain what i want through the illustration below. When i execute script.sh, i should get the following output $sh script.sh $ /* command prompt and then print hi */ hi My script.sh is like this #! /bin/bash <command to display the shell command prompt> echo "hi" exit 0 what should the code that has to go in the place of angle brackets to get an output like above? Thanks

    Read the article

  • Can I use REG_EXPAND_SZ for the locations of shell folders instead of REG_SZ

    - by Jherico
    I'm working on re-arranging a number of the shell folders in windows 7 to utilize Dropbox to keep a set of machines in sync. I'd like to create a .reg file which I can use to update the locations of these folders rather than manually changing them from the UI, but I don't want to rely on the path to the home folder being the same each time. So my question is, is it possible to replace the REG_SZ values in HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders with REG_EXPAND_SZ values specifying an offset from %HOME% instead of an exact path?

    Read the article

  • What to use for Shell Access?

    - by Aristotle
    I just purchased a virtual dedicated server-plan that comes with shell access. It's been a while since I've actually used shell access remotely, so I'm a bit behind the times. Years ago I used PuTTY, but I'm curious if there are any better options that I should consider for establishing that connection, and managing my server remotely. I figured this question would be most appropriately asked here since it is regarding tools.

    Read the article

  • Running a shell script in *nix

    - by Ben
    Bit of a newb using *nix (I'm actually using a bash shell in OS X 10.5) and I wondered what the probably very simple answer is to this... When I write a script (called, say, my_script) and I've saved it to the current directory, why do I have to put a period and a forward slash in front of its name to run it? Like this: ./my_script Can't the shell tell that I want to run it from the current directory? Windows seems to handle that situation. Cheers Ben

    Read the article

  • ksh93 as default shell via ssh

    - by jessem
    Howdy, I'm a big fan of ksh93. My hosts' shell account does not allow me to configure .login .profile or chsh to change my default shell. As it is, I am dropped into jailshell-3.2 and I have to invoke /bin/ksh93 manually. Is there some work around for this? Thanks in advance.

    Read the article

  • Scroll shell output with mouse in tmux

    - by user31494
    Mouse scrolling doesn't work in tmux the way it works when I run shell without tmux (in Gnome Terminal). It seems tmux sends mouse scroll events as if I pressed Up/Down keys. But I want it to scroll though the shell output history. Is there a way to make tmux work like this? Note: I know how to scroll with keyboard (thanks to another question here). Tried mouse scrolling in two versions of tmux: 0.8-5hardy1 (on Ubuntu Hardy) 1.3-1 (on Ubuntu Maverick)

    Read the article

  • Disable default Gnome Shell Super Key Mapping

    - by soares
    Gnome Shell by default uses the Super (Windows) key to display the activities overview. But I'd prefer to use the Super key to invoke Synapse. Right now I have to press Super+Super+Spacebar in order to invoke Synapse which is annoying (Super+Spacebar is the binding to invoke Synapse). Is there any way to remove the default Gnome Shell mapping? In the keyboard shortcuts system settings, only the Alt+F1 binding appears for the activities overview action.

    Read the article

  • Mac Remote Shell

    - by Jamza
    I am trying to create a remote shell on OS X with NC. I tried nc -l 1337 -e /bin/bash but it seems that the Mac version of NC does not support the -e option. Does anyone know how I can achieve a remote shell on OS X preferably only using the built in tools? Thank you.

    Read the article

  • How to use parallel execution in a shell script?

    - by eSKay
    I have a C shell script that does something like this: #!/bin/csh gcc example.c -o ex gcc combine.c -o combine ex file1 r1 <-- 1 ex file2 r2 <-- 2 ex file3 r3 <-- 3 #... many more like the above combine r1 r2 r3 final \rm r1 r2 r3 Is there some way I can make lines 1, 2 and 3 run in parallel instead of one after the another?

    Read the article

  • Can Ruby access output from shell commands as it appears?

    - by Ciryon
    My Ruby script is running a shell command and parsing the output from it. However, it seems the command is first executed and output saved in an array. I would like to be able to access the output lines in real time just as they are printed. I've played around with threads, but haven't got it to work. Any suggestions?

    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

  • 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

  • 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

  • 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

< Previous Page | 2 3 4 5 6 7 8 9 10 11 12 13  | Next Page >