Search Results

Search found 25651 results on 1027 pages for 'shell script'.

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

  • How do I create a "here document" within a shell function?

    - by BenU
    I'm working my way through William Shotts Jr.'s great The Linux Command Line on my Mac OSX 10.7.5 system. 90% of the linux that Shotts covers is close enough to Darwin that I can figure out or GTEM to figure out what's going on. I've made it to chapter 27 on "Writing Shell Scripts" and am getting hung up creating "here files" within a function. I get an syntax error: unexpected end of file error when I include the following function: report_uptime () { cat <<- _EOF_ <H2>System Uptime</H2> <PRE>$(uptime)</PRE> _EOF_ return } The error goes away if I use the following function placeholder: report_uptime () { return } Also, elsewhere in the script, outside of a function I use the cat << _EOF_ format to create a "here file" with no trouble: cat << _EOF_ <HTML> <HEAD> <TITLE>$TITLE</TITLE> </HEAD> <BODY> <H1>$TITLE</H1> <P>$TIME_STAMP</P> $(report_uptime) $(report_disk_space) $(report_home_space) </BODY> </HTML> _EOF_ If anyone has any idea what I'm doing wrong I would be grateful!

    Read the article

  • How do I configure Tomcat services in Ubuntu?

    - by Karan
    I have created a Tomcat script inside the /etc/init.d directory which is #!/bin/bash # description: Tomcat Start Stop Restart # processname: tomcat # chkconfig: 234 20 80 JAVA_HOME=/usr/java/jdk1.6.0_30 export JAVA_HOME PATH=$JAVA_HOME/bin:$PATH export PATH CATALINA_HOME=/usr/tomcat/apache-tomcat-6.0.32 case $1 in start) sh $CATALINA_HOME/bin/startup.sh ;; stop) sh $CATALINA_HOME/bin/shutdown.sh ;; restart) sh $CATALINA_HOME/bin/shutdown.sh sh $CATALINA_HOME/bin/startup.sh ;; esac exit 0 After this I am trying to add this into chkconfig which is as [root@blanche init.d]# chkconfig --add tomcat [root@blanche init.d]# chkconfig --level 234 tomcat on But it is giving me the following error: [root@blanche init.d]:/etc/init.d$ chkconfig --add tomcat insserv: warning: script 'K20acpi-support' missing LSB tags and overrides insserv: warning: script 'tomcat' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'failsafe-x' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'acpid' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'dmesg' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'udevmonitor' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'ufw' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'module-init-tools' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'plymouth-splash' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'gdm' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'rsyslog' missing LSB tags and overrides insserv: warning: current start runlevel(s) (0 6) of script `wpa-ifupdown' overwrites defaults (empty). The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'hwclock' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'console-setup' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'udev' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'plymouth-log' missing LSB tags and overrides insserv: warning: current start runlevel(s) (0) of script `halt' overwrites defaults (empty). The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'mysql' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'atd' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'network-manager' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'alsa-mixer-save' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'udev-finish' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'screen-cleanup' missing LSB tags and overrides insserv: warning: script 'acpi-support' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'avahi-daemon' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'dbus' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'procps' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'irqbalance' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'plymouth-stop' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'anacron' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'plymouth' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'udevtrigger' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'hostname' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'hwclock-save' missing LSB tags and overrides insserv: warning: current start runlevel(s) (0 6) of script `networking' overwrites defaults (empty). insserv: warning: current start runlevel(s) (0 6) of script `umountfs' overwrites defaults (empty). insserv: warning: current start runlevel(s) (0 6) of script `umountnfs.sh' overwrites defaults (empty). The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'network-interface' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'network-interface-security' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'cron' missing LSB tags and overrides The script you are attempting to invoke has been converted to an Upstart job, but lsb-header is not supported for Upstart jobs. insserv: warning: script 'apport' missing LSB tags and overrides insserv: warning: current start runlevel(s) (6) of script `reboot' overwrites defaults (empty). insserv: warning: current start runlevel(s) (0 6) of script `umountroot' overwrites defaults (empty). insserv: warning: current start runlevel(s) (0 6) of script `sendsigs' overwrites defaults (empty). insserv: There is a loop between service rsyslog and pulseaudio if stopped insserv: loop involving service pulseaudio at depth 3 insserv: loop involving service rsyslog at depth 2 insserv: loop involving service udev at depth 1 insserv: There is a loop between service rsyslog and pulseaudio if stopped insserv: loop involving service bluetooth at depth 2 insserv: exiting now without changing boot order! /sbin/insserv failed, exit code 1 tomcat 0:off 1:off 2:off 3:off 4:off 5:off 6:off Please suggest what to do for configuring a Tomcat server as a service.

    Read the article

  • Launch ubuntu software center from gnome shell

    - by Daniel Hughes
    I have been playing around with Gnome Shell from ubuntu 9.10. I installed the preview which is available in Ubuntu 9.10 repositories using sudo apt-get install gnome-shell gnome-shell --replace However I can't figure out how to launch Ubuntu Software Center using it. It just appears to be missing. The software center appears fine in normal gnome. How do you launch the Ubuntu Software Center from Gnome Shell. For those of you who are getting confused, Gnome Shell is the next generation user interface for gnome, it is planned for inclusion as default in Gnome 3.0, there is a preview of it in the Ubuntu 9.10 repositories. I am not interested in how to launch Ubuntu Software Center from the terminal or in how to launch it from the normal gnome interface.

    Read the article

  • How to run Windows 7 Explorer shell with Administrator Privileges by default

    - by Barry Kelly
    The Windows 7 shell (Explorer) can be made to run with Administrator privileges by this manual process: Kill Explorer shell by holding down Shift+Ctrl, right-clicking the Shut down button in the Start Menu, and selecting Exit Explorer Start Task Manager with Ctrl+Shift+Esc Elevate Task Manager privileges by going to Processes tab and selecting Show processes from all users Then start up a new instance of the shell by File | Run in Task Manager, typing in explorer, and selecting the Create this task with administrative privileges. After following the above process, the Windows shell will be running with administrative privileges, and any programs it launches will also have administrative privileges. This makes performing tasks that require the privilege far easier, particularly for command-line applications, which usually fail silently or with an Access denied. message rather than giving an opportunity to use UAC to elevate the process's privileges. What I'm interested in, though, is creating an account which uses a privileged shell by default, rather than having to follow this laborious process every time. How can it be done?

    Read the article

  • Run shell script on a command

    - by LinuxPenseur
    Hi, I want to run a shell script when date -s <string> command is used. For example i want to log the command to the file /tmp/user.log by executing the following command in the shell script logger -p user.notice "date -s command executed" -f /tmp/user.log How can run a shell script when date -s <string> is executed on the shell? To make it more general, I want to run my shell script when someone else issues a particular linux command on my system. How to do this?

    Read the article

  • How can I change shell in Ubuntu?

    - by Sanoj
    I have a Ubuntu Server VPS and I want to use /bin/bash/ as my shell. How can I change my shell? I have root access but I don't work as root. So dash is my default shell now. I have read How do I make Bash my default shell on Ubuntu? and chsh seams to be the preferred way to go. But when I type chsh /bin/bash I get this message: chsh: unknown user /bin/bash And if I just type /bin/bash the Bash shell seams to work fine. How to change it?

    Read the article

  • UNIX script to convert queries

    - by Harish
    I need a UNIX shell script to convert my queries from Java compatible to Oracle compatible format. ie. I have all the java compatible queries: java: SELECT a, b, c, d, e, f,g "+// "from test where year(timestamp)=year(today) and month(timestamp)=month(today) " +// "and day(timestamp)=2 and h='" + "W" + "'" Oracle SELECT a, b, c,d,e,f,g from test where year(timestamp)=year(today) and month(timestamp)=month(today) and day(timestamp)=2 and h='W' Is it possible using sed or awk?

    Read the article

  • Random number from a range in a Bash Script

    - by Jack
    Hi, I need to generate a random port number between 2000-65000 from a shell script. The problem is $RANDOM is only a 16bit number, so im stuck! PORT=$(($RANDOM%63000+2001)) would work nicely if it wasn't for the size limitation. Does anyone have an example of how I can do this, maybe by extracting something from /dev/urandom and getting it within a range? Thanks.

    Read the article

  • Comments syntax for Idoc Script

    - by kyle.hatlestad
    Maybe this is widely known and I'm late to the party, but I just ran across the syntax for making comments in Idoc Script. It's been something I've been hoping to see for a long time. And it looks like it quietly snuck into the 10gR3 release. So for comments in Idoc Script, you simply [[% surround your comments in these symbols. %]] They can be on the same line or span multiple lines. If you look in the documentation, it still mentions making comments using the syntax. Well, that's certainly not an ideal approach. You're stuffing your comment into an actual variable, it's taking up memory, and you have to watch double-quotes in your comment. A perhaps better way in the old method is to start with my comments . Still not great, but now you're not assigning something to a variable and worrying about quotes. Unfortunately, this syntax only works in places that use the Idoc format. It can't be used in Idoc files that get indexed (.hcsp & .hcsf) and use the <!--$...--> format. For those, you'll need to continue using the older methods. While on the topic, I thought I would highlight a great plug-in to Notepad++ that Arnoud Koot here at Oracle wrote for Idoc Script. It does script highlighting as well as type-ahead/auto-completion for common variables, functions, and services. For some reason, I can never seem to remember if it's DOC_INFO_LATESTRELEASE or DOC_INFO_LATEST_RELEASE, so this certainly comes in handy. I've updated his plug-in to use this new comments syntax. You can download a copy of the plug-in here which includes installation instructions.

    Read the article

  • Gnome-shell worskpace preview on dual screen

    - by martin
    I'have isntalled gnome3 and I have dual screens(laptop, monitor). Is it possible to see the other monitor in workspace preview in the gnome panel??? I only can see primary monitor, that's why i'm not able to move windows inside the second screen? I've tried to change some settings in dconf , but with no luck. I want to have it like this http://stephen.rees-carter.net/wp-content/uploads/2011/04/Unity-workspace-switcher.png Does anyone have a solution?

    Read the article

  • script to search and replace deprecated functions

    - by user573881
    Hi, I am using the following script to search and replace the deprecated functions in a file with the newer ones. 5 for strFile in `ls deprecated_functions_search_and_replace.txt ` 6 do 7 sed "s/ereg_replace[^\(]*(\([^,]*\),/preg_replace\1('#'.\2.'#',/g" $strFile > temp_file 8 mv $strFile $strFile".bakup" 9 mv temp_file $strFile 10 11 sed "s/eregi[^\(]*(\([^,]*\),/preg_match\1('#'.\2.'#i',/g" $strFile > temp_file 12 mv $strFile $strFile".bakup" 13 mv temp_file $strFile 14 15 sed "s/ereg[^\(]*(\([^,]*\),/preg_match\1('#'.\2.'#',/g" $strFile > temp_file 16 mv $strFile $strFile".bakup" 17 mv temp_file $strFile 18 19 sed "s/split[^\(]*(\([^,]*\),/preg_split\1('#'.\2.'#',/g" $strFile > temp_file 20 mv $strFile $strFile".bakup" 21 mv temp_file $strFile 22 23 sed "s/mysql_escape_string/mysql_real_escape_string/g" $strFile > temp_file 24 mv $strFile $strFile".bakup" 25 mv temp_file $strFile 26 27 sed "s/set_magic_quotes_runtime(0)/\/\/set_magic_quotes_runtime(0)/g" $strFile > temp_file 28 mv $strFile $strFile".bakup" 29 mv temp_file $strFile 30 31 sed "s/ini_get('safe_mode')/false/g" $strFile > temp_file 32 mv $strFile $strFile".bakup" 33 mv temp_file $strFile 34 35 sed "s/session_register('\(.*\)')/$_SESSION['\1']=$\1/g" $strFile > temp_file 36 mv $strFile $strFile".bakup" 37 mv temp_file $strFile 38 39 sed "s/session_unregister('\(.*\)')/$_SESSION['\1']=''/g" $strFile > temp_file 40 mv $strFile $strFile".bakup" 41 mv temp_file $strFile 42 43 done However, when I run this script I am getting an error saying: sed: -e expression #1, char 60: invalid reference \2 on `s' command's RHS sed: -e expression #1, char 52: invalid reference \2 on `s' command's RHS sed: -e expression #1, char 50: invalid reference \2 on `s' command's RHS sed: -e expression #1, char 51: invalid reference \2 on `s' command's RHS I am unable to figure out whats going wrong. Someone please help me. Regards.

    Read the article

  • How do I get a Mac ".command" file to automatically quit after running a shell script?

    - by LOlliffe
    In my shell script, my last lines are: ... echo "$l" done done exit I have Terminal preference set to "When the shell exits: Close the window". In all other cases, when I type "exit" or "logout", in Terminal, the window closes, but for this ".command" file (I can double-click on my shell script file, and the script runs), instead of closing the window, while the file's code says "exit", what shows on the screen is: ... $l done logout [Process completed] ...and the window remains open. Does anyone know how to get a shell script to run, and then just automatically quit the Terminal window on completion? Thanks!

    Read the article

  • Is there any functional-like unix shell?

    - by Caruccio
    I'm (really) newbie to functional programming (in fact only had contact with it using python) but seems to be a good approach for some list-intensive tasks in a shell environment. I'd love to do something like this: $ [ git clone $host/$repo for repo in repo1 repo2 repo3 ] Is there any Unix shell with these kind of feature? Or maybe some feature to allow easy shell access (commands, env/vars, readline, etc...) from within python (the idea is to use python's interactive interpreter as a replacement to bash). EDIT: Maybe a comparative example would clarify. Let's say I have a list composed of dir/file: $ FILES=( build/project.rpm build/project.src.rpm ) And I want to do a really simple task: copy all files to dist/ AND install it in the system (it's part of a build process): Using bash: $ cp ${files[*]} dist/ $ cd dist && rpm -Uvh $(for f in ${files[*]}; do basename $f; done)) Using a "pythonic shell" approach (caution: this is imaginary code): $ cp [ os.path.join('dist', os.path.basename(file)) for file in FILES ] 'dist' Can you see the difference ? THAT is what i'm talking about. How can not exits a shell with these kind of stuff build-in yet? It's a real pain to handle lists in shell, even its being a so common task: list of files, list of PIDs, list of everything. And a really, really, important point: using syntax/tools/features everybody already knows: sh and python. IPython seams to be on a good direction, but it's bloated: if var name starts with '$', it does this, if '$$' it does that. It's syntax is not "natural", so many rules and "workarounds" ([ ln.upper() for ln in !ls ] -- syntax error)

    Read the article

  • Problem with Bash script: 'declare: not found'

    - by Ashfame
    I had a script which was running fine but when I ran it today, it says declare: not found. I am using bash shell and path at the starting of the script is correct. Two flagged lines in my script are as follows: declare -a RESPONSE RESPONSE=($RESULT) It also says ( is unexpected but I guess that is coming up because of the first error. Worth mentioning point is when I type in declare directly works fine. declare | grep USER shows USER=ashfame USERNAME=ashfame values="$SVN_BASH_USERNAME"; So, whats wrong here?

    Read the article

  • Daemon process exiting when shell closes

    - by Pace
    I have a script which starts a daemon process and then sleeps for 20 seconds. If I run the script on SLES11 SP1 or RHEL6 then after the script exits the process is still running. If I run the script on SLES11 SP3 or RHEL6.3 then after the script exits the process is no longer running. The process continues to run for the entire 20 second sleep and is killed when the process exits. The script is run via expect so the script's entire shell exits with the process. Obviously if this wasn't a daemon it was starting I wouldn't be surprised. Also, I suspect the problem isn't the OS version as much as it is the difference in the way we've setup the newer servers (no idea what those differences are though, the older servers were set up years ago). During the 20 seconds the process runs if I do a ps I get the following: root 4699 1 0 15:14 pts/2 00:00:00 sudo -u openmq /opt/PacketPortal/openmq/default/bin/imqbrokerd -bgnd -autorestart -silent -port 7676 -Dimq.service.activelist=admin,ssljms -D openmq 4701 4699 0 15:14 pts/2 00:00:00 /bin/sh /opt/PacketPortal/openmq/default/bin/imqbrokerd -bgnd -autorestart -silent -port 7676 -Dimq.service.activelist=admin,ssljms -Dimq.ssl The fact that the parent process of 4699 is 1 seems to suggest to me that the process has been correctly daemonized. However, after the expect script exits both 4699 and 4701 are killed. What could be causing this? UPDATE I've printed the same output on the servers that work. During the 20 second sleep I get: openmq 18652 1 0 15:44 pts/1 00:00:00 /bin/sh /opt/PacketPortal/openmq/default/bin/imqbrokerd -bgnd -autorestart -silent -port 7676 -Dimq.service.activelist=admin,ssljms -Dimq.ssljms.tls.port=7680 openmq 18686 18652 8 15:44 pts/1 00:00:02 /usr/java/latest/bin/java -cp /opt/PacketPortal/openmq/default/bin/../lib/imqbroker.jar:/opt/PacketPortal/openmq/default/bin/../lib/imqutil.jar:/opt/PacketPortal/ope After the 20 second sleep I get: openmq 18652 1 0 15:44 ? 00:00:00 /bin/sh /opt/PacketPortal/openmq/default/bin/imqbrokerd -bgnd -autorestart -silent -port 7676 -Dimq.service.activelist=admin,ssljms -Dimq.ssljms.tls.port=7680 openmq 18686 18652 5 15:44 ? 00:00:02 /usr/java/latest/bin/java -cp /opt/PacketPortal/openmq/default/bin/../lib/imqbroker.jar:/opt/PacketPortal/openmq/default/bin/../lib/imqutil.jar:/opt/PacketPortal/ope After the script exits it disconnects the controlling terminal. I wonder why it doesn't do that on the newer servers. UPDATE Here is the section of the script that actually launches OpenMQ. The -bgnd flag is what is supposed to daemonize it. sudo -u openmq $IMQ_HOME/bin/$EXECUTABLE -bgnd $BROKER_OPTIONS $ARGS > /dev/null 2>&1 &

    Read the article

  • run a script on window switch (on alt-tabbing into/outof a particular app)

    - by hwjp
    I'd like to run a script whenever I switch into or out of a window. Specifically, I have a "toggle touchpad on/off" script, which i want to run whenever I switch into or out of gvim. so, is there any kind of hook for that? even something that can be run whenever alt-tab is detected, as long as it can tell what window you're going from/to? I'm using gnome-shell, if that makes any difference. [edit] Have started looking into gnome-shell-extensions, which seem to be written in javascript, so might not be too hard to hack one together myself...

    Read the article

  • Looking for a user suggestion script

    - by Jamison
    I'm looking for a script that would easily fit or be customized to work as a suggestion script where users can submit suggestions anonymously and have them be displayed on one page and either upvoted or downvoted like digg or reddit without user accounts. Basically i want users to be able to submit an idea and the other users like or dislike it and no one is track for voting, commenting or submitting.

    Read the article

  • Bash script: bad interpreter

    - by Quandary
    Question: I get this error message: export: bad interpreter: No such file or directory when I execute this bash script #!/bin/bash MONO_PREFIX=/opt/mono-2.6 GNOME_PREFIX=/opt/gnome-2.6 export DYLD_LIBRARY_PATH=$MONO_PREFIX/lib:$DYLD_LIBRARY_PATH export LD_LIBRARY_PATH=$MONO_PREFIX/lib:$LD_LIBRARY_PATH export C_INCLUDE_PATH=$MONO_PREFIX/include:$GNOME_PREFIX/include export ACLOCAL_PATH=$MONO_PREFIX/share/aclocal export PKG_CONFIG_PATH=$MONO_PREFIX/lib/pkgconfig:$GNOME_PREFIX/lib/pkgconfig PATH=$MONO_PREFIX/bin:$PATH PS1="[mono-2.6] \w @ " But the bash path seems to be correct: asshat@IS1300:~/sources/mono-2.6# which bash /bin/bash asshat@IS1300:~# cd sources/ asshat@IS1300:~/sources# cd mono-2.6/ asshat@IS1300:~/sources/mono-2.6# ./mono-2.6-environment export: bad interpreter: No such file or directory asshat@IS1300:~/sources/mono-2.6# ls download mono-2.4 mono-2.4-environment mono-2.6 mono-2.6-environment asshat@IS1300:~/sources/mono-2.6# cp mono-2.6-environment mono-2.6-environment.sh asshat@IS1300:~/sources/mono-2.6# ./mono-2.6-environment.sh export: bad interpreter: No such file or directory asshat@IS1300:~/sources/mono-2.6# ls download mono-2.4-environment mono-2.6-environment mono-2.4 mono-2.6 mono-2.6-environment.sh asshat@IS1300:~/sources/mono-2.6# bash mono-2.6-environment asshat@IS1300:~/sources/mono-2.6# What am I doing wrong? Or is this a Lucid bug? [i did chmod + x]

    Read the article

  • How to make a Shell Script create a copy and terminate itself?

    - by ricedragon
    So far I used trap " call function" 2 fucntion { ./test.sh exit } but it never reaches the exit line and a whole bunch of process piles up any one got any idea? I tried & (bg) but i need to be able to keep doing it , the bg only allows me to do it once The point of it is when i type ctrl C it should terminate the original test.sh but it should also call itself before terminating hence create a new process.

    Read the article

  • How to run a script on startup in XP?

    - by Daniel Williams
    Just want to run a DOS script to set some parameters. Where do I put the batch file? Clarification: I want to run some DOS commands when I start a DOC prompt, mainly to set some aliases. This is really what I am looking for, not really when logging in or starting the system. I apologize for not being more clear. For example I want to run: doskey ls=dir Just so I can type ls rather than dir.

    Read the article

  • Setting default working directory/drive in Emacs shell on Windows

    - by Victor K.
    Hello, how can I change a default working directory/drive for shell in Emacs (on Windows)? Normally, shell starts in the same directory as the file in current buffer. However, when my current file is on D: drive, it starts in c:. Manually changing drive to D: in shell brings me to my directory of course, but I want to avoid this extra step. Is it possible?

    Read the article

  • Shell extension to display thumbnails of PDF files

    - by hamilton
    Foxit PDF, doesn't have a shell extension to display thumbnails of PDF files in Windows Explorer (the thumbnails are shown instead of PDF document icons). Is there a shell extension that do that? i.e to see thumbnails instead of PDF icon. BTW, PDFXchange and Adobe have a shell extension such that the thumbnails are shown instead of PDF document icons.

    Read the article

  • Override LDAP shell

    - by Incredible
    I have a LDAP server and a predefined shell (bash) set in it. But there are some machine on which I want a different shell to be used whenever user login to that instead of the shell stored in LDAP. How can I do this?? Can someone give me some direction in this? Thank you

    Read the article

  • Shell Script to Start Mysql Server if not running

    - by user103373
    I have written a shell script to start mysql server & send a mail to admin user if it's restarted via shell script. What i am facing an issue if I run this shell script on terminal it's work perfectly & If same script runs via cronjob it's only sending the mail to the user & problem remains same. Is this problem relates to permission & how can i resolve it. Shell Script-------- #!/bin/bash EMAIL="[email protected]" SERVICE='mysql' if ps ax | grep -v grep | grep $SERVICE > /dev/null then echo "$SERVICE service running, everything is fine" else echo "$SERVICE is not running" /etc/init.d/mysql start cat <<EOF | msmtp -a gmail $EMAIL Subject: "Alert (Test Server) : Mysql Service is not running (Manually Restarted)" Mysql Server Restarted at: `date` EOF EXIT I am using msmtp for sending mail to the user on ubuntu 12.04 Server.

    Read the article

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