Search Results

Search found 1931 results on 78 pages for 'sh'.

Page 1/78 | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Difference between sh file.sh and file.sh

    - by RAS
    I have two questions : What is the difference between executing sh filename.sh and filename.sh? How can I make both of them giving me the same output ? I'm asking this question as right now I'm facing a problem. I'm trying to run a Java + SWT application from terminal. When I do filename.sh, it gives me the desired output. But when I do sh filename.sh or bash filename.sh, it throws me an error : Exception in thread "main" java.lang.NoClassDefFoundError: MainForm/java Caused by: java.lang.ClassNotFoundException: MainForm.java at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) Could not find the main class: MainForm.java. Program will exit. I know this question is already asked here but I'm still not clear about it. I have gone through the following links : What is the difference between ./ and sh to run a script? Can scripts run even when they are not set as executable? Can anyone help me with this?

    Read the article

  • Whats the difference between running a shell script as ./script.sh and sh script.sh

    - by Ritesh M Nayak
    I have a script that looks like this #!/bin/bash function something() { echo "hello world!!" } something | tee logfile I have set the execute permission on this file and when I try running the file like this $./script.sh it runs perfectly fine, but when I run it on the command line like this $sh script.sh It throws up an error. Why does this happen and what are the ways in which I can fix this.

    Read the article

  • Cannot find install-sh, install.sh, or shtool in ac-aux

    - by Micah
    This is my first time trying to compile and install anything on a linux machine. I got the latest version of https://github.com/processone/exmpp via git and read the instructions which state: 2. Build and install Exmpp uses the Autotools. Therefore the process is quite common: $ ./configure $ make $ sudo make install after type ./configure I get the error Cannot find install-sh, install.sh, or shtool in ac-aux Google was of little to no help. Not sure at all what I'm supposed to do. Any help would be much appreciated

    Read the article

  • Run .sh (no service) file on startup

    - by MyTitle
    How to execute a script once at startup time on CentOS 6.3? I added file with following containment #chkconfig: 2345 95 20 #description: Some description sh /opt/somePath/my.sh into /etc/ini.d and it works fine (I executed required chmod, chkconfig). But my.sh file is compatible to run as service. And when I try to run in same way another .sh file (which can't to tun as service) I get exceptions on starting X. So I want to know how I can run .sh files which are not services. Thanks.

    Read the article

  • Why do I sometimes get 'sh: $'\302\211 ... ': command not found' in xterm/sh?

    - by amn
    Sometimes when I simply type a valid command like 'find ...', or anything really, I get back the following, which is completely unexpected and confusing (... is command name I type): sh: $'\302\211...': command not found There is some corruption going on I think. I don't use color in my prompt, I am using the Bash shell in POSIX mode as sh (chsh to /bin/sh and so on - $SHELL is sh). What is going on and why does this keep happening? Anything I can debug? I think this is more of an xterm issue than sh, or at least a combination of the two. Files, for context: My /etc/profile, as distributed with Arch Linux x86-64: # /etc/profile #Set our umask umask 022 # Set our default path PATH="/usr/local/sbin:/usr/local/bin:/usr/bin" export PATH # Load profiles from /etc/profile.d if test -d /etc/profile.d/; then for profile in /etc/profile.d/*.sh; do test -r "$profile" && . "$profile" done unset profile fi # Source global bash config if test "$PS1" && test "$BASH" && test -r /etc/bash.bashrc; then . /etc/bash.bashrc fi # Termcap is outdated, old, and crusty, kill it. unset TERMCAP # Man is much better than us at figuring this out unset MANPATH My /etc/shrc, which I created as a way to have sh parse some file on startup, when non-login shell. This is achieved using ENV variable set in /etc/environment with the line ENV=/etc/shrc: PS1='\u@\H \w \$ ' alias ls='ls -F --color' alias grep='grep -i --color' [ -f ~/.shrc ] && . ~/.shrc My ~/.profile, I am launching X when logging in through first virtual tty: [[ -z $DISPLAY && $XDG_VTNR -eq 1 ]] && exec xinit -- -dpi 111 My ~/.xinitc, as you can see I am using the system as a Virtual Box guest: xrdb -merge ~/.Xresources VBoxClient-all awesome & exec xterm And finally, my ~/.Xresources, no fancy stuff here I guess: *faceName: Inconsolata *faceSize: 10 xterm*VT100*translations: #override <Btn1Up>: select-end(PRIMARY, CLIPBOARD, CUT_BUFFER0) xterm*colorBDMode: true xterm*colorBD: #ff8000 xterm*cursorColor: S_red Since ~/.profile references among other things /etc/bash.bashrc, here is its content: # # /etc/bash.bashrc # # If not running interactively, don't do anything [[ $- != *i* ]] && return PS1='[\u@\h \W]\$ ' PS2='> ' PS3='> ' PS4='+ ' case ${TERM} in xterm*|rxvt*|Eterm|aterm|kterm|gnome*) PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"' ;; screen) PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"' ;; esac [ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion I have no idea what that case statement does, by the way, it does look a bit suspicious though, but then again, who am I to know.

    Read the article

  • OSX Lion - sh: mysql command not found

    - by mkk
    I have pretty simple issue I believe. I have successfully installed mysql etc. I do not have any problems with running "mysql" command from terminal [ bash ]. Suddenly, when my application tried to run mysql command I got error: sh: mysql: command not found.. In terminal, when I type sh and then mysql I can log in to mysql without any problems. I have added mysql to PATH in .bash_profile and I suspect this is why sh cannot see it. I have cp .bash_profile to .profile but it did not do the trick, any ideas how can I fix this issue?

    Read the article

  • Running cronjob in the odd-numbered days

    - by Spacedust
    I'm currently running my MySQL backup script on every day of the week: 0 1 * * 1 sh /root/mysql_monday.sh 0 1 * * 2 sh /root/mysql_tuesday.sh 0 1 * * 3 sh /root/mysql_wednesday.sh 0 1 * * 4 sh /root/mysql_thursday.sh 0 1 * * 5 sh /root/mysql_friday.sh 0 1 * * 6 sh /root/mysql_saturday.sh 0 1 * * 0 sh /root/mysql_sunday.sh Now I would like to keep backups for one week more so two weeks in total just to be more secure. For example: I though I can create one backup file on monday in the even days and then again in the odd-numbered days. For even days I can just use: 0 1 */2 * 1 sh /root/mysql_monday_even.sh 0 1 */2 * 2 sh /root/mysql_tuesday_even.sh 0 1 */2 * 3 sh /root/mysql_wednesday_even.sh 0 1 */2 * 4 sh /root/mysql_thursday_even.sh 0 1 */2 * 5 sh /root/mysql_friday_even.sh 0 1 */2 * 6 sh /root/mysql_saturday_even.sh 0 1 */2 * 0 sh /root/mysql_sunday_even.sh But what about the odd-numbered days ?

    Read the article

  • date and other commands no longer working in sh script

    - by williamsdb
    I have a shell script that used to run find on Ubuntu 10.04 but since I have moved to 12.04 it doesn't work as before throwing the following messages: /home/checks.sh: 1: /home/checks.sh: date : not found find: invalid mode `0777\r' the script is as follows: date echo "" echo "Files changed in the last 24 hours" echo "==================================" find /var/www -mtime -1 | grep -iv '.log' echo "" echo "" echo "Files with permissions set to 777" echo "=================================" find /var/www -perm 0777 all lines work from the command line but not in the shell script any more. Can't find anything in the manual to suggest why.

    Read the article

  • creating a .sh file programmatically under windows and running it on a linux system from cygwin

    - by user1296193
    i want to write program, in windows, which will write a .sh file, then connect to a linux machine via cygwin and ssh, and execute that .sh file. I've had to use dos2unix to convert .sh files that I created in windows to run under linux. Obviously if I am executing a script with ssh it will have to be linux formatted to work. so I need to know how to create a linux appropriate .sh file using c or openoffice basic or vBA. thanks!

    Read the article

  • Monitoring SQL Server Agent job run times

    - by okeofs
    Introduction A few months back, I was asked how long a particular nightly process took to run. It was a super question and the one thing that struck me was that there were a plethora of factors affecting the processing time. This said, I developed a query to ascertain process run times, the average nightly run times and applied some KPI’s to the end query. The end goal being to enable me to quickly detect anomalies and processes that are running beyond their normal times. As many of you are aware, most of the necessary data for this type of query, lies within the MSDB database. The core portion of the query is shown below.select sj.name,sh.run_date, sh.run_duration, case when len(sh.run_duration) = 6 then convert(varchar(8),sh.run_duration) when len(sh.run_duration) = 5 then '0' + convert(varchar(8),sh.run_duration) when len(sh.run_duration) = 4 then '00' + convert(varchar(8),sh.run_duration) when len(sh.run_duration) = 3 then '000' + convert(varchar(8),sh.run_duration) when len(sh.run_duration) = 2 then '0000' + convert(varchar(8),sh.run_duration) when len(sh.run_duration) = 1 then '00000' + convert(varchar(8),sh.run_duration) end as tt from dbo.sysjobs sj with (nolock) inner join dbo.sysjobHistory sh with (nolock) on sj.job_id = sh.job_id where sj.name = 'My Agent Job' and [sh.Message] like '%The job%') Run_date and run_duration are obvious fields. The field ‘Name’ is the name of the job that we wish to follow. The only major challenge was that the format of the run duration which was not as ‘user friendly’ as I would have liked. As an example, the run duration 1 hour 10 minutes and 3 seconds would be displayed as 11003; whereas I wanted it to display this in a more user friendly manner as 01:10:03. In order to achieve this effect, we need to add leading zeros to the run_duration based upon the case logic shown above. At this point what we need to do add colons between the hours and minutes and one between the minutes and seconds. To achieve this I nested the query shown above (in purple) within a ‘super’ query. Thus the run time ([Run Time]) is constructed concatenating a series of substrings (See below in Blue). select run_date,substring(convert(varchar(20),tt),1,2) + ':' +substring(convert(varchar(20),tt),3,2) + ':' +substring(convert(varchar(20),tt),5,2) as [run_time] from (select sj.name,sh.run_date, sh.run_duration,case when len(sh.run_duration) = 6 then convert(varchar(8),sh.run_duration)when len(sh.run_duration) = 5 then '0' + convert(varchar(8),sh.run_duration)when len(sh.run_duration) = 4 then '00' + convert(varchar(8),sh.run_duration)when len(sh.run_duration) = 3 then '000' + convert(varchar(8),sh.run_duration)when len(sh.run_duration) = 2 then '0000' + convert(varchar(8),sh.run_duration)when len(sh.run_duration) = 1 then '00000' + convert(varchar(8),sh.run_duration)end as ttfrom dbo.sysjobs sj with (nolock)inner join dbo.sysjobHistory sh with (nolock) on sj.job_id = sh.job_id where sj.name = 'My Agent Job'and [sh.Message] like '%The job%') a Now that I had each nightly run time in hours, minutes and seconds (01:10:03), I decided that it would very productive to calculate a rolling run time average. To do this, I decided to do the calculations in base units of seconds. This said, I encapsulated the query shown above into a further ‘super’ query (see the code in RED below). This encapsulation is shown below. The astute reader will note that I used implied casting from integer to string, which is not the best method to use however it works. This said and if I were constructing the query again I would definitely do an explicit convert. To Recap: I now have a key field of ‘1’, each and every applicable run date and the total number of SECONDS that the process ran for each run date, all of this data within the #rawdata1 temporary table. Select 1 as keyy,run_date,(substring(b.run_time,1,2)*3600) + (substring(b.run_time,4,2)*60) + (substring(b.run_time,7,2)) as run_time_in_Seconds,run_time into #rawdata1 from ( select run_date,substring(convert(varchar(20),tt),1,2) + ':' + substring(convert(varchar(20),tt),3,2) + ':' +substring(convert(varchar(20),tt),5,2) as [run_time] from (select sj.name,sh.run_date, sh.run_duration, case when len(sh.run_duration) = 6 then convert(varchar(8),sh.run_duration)when len(sh.run_duration) = 5 then '0' + convert(varchar(8),sh.run_duration)when len(sh.run_duration) = 4 then '00' + convert(varchar(8),sh.run_duration)when len(sh.run_duration)    = 3 then '000' + convert(varchar(8),sh.run_duration)when len(sh.run_duration)    = 2 then '0000' + convert(varchar(8),sh.run_duration)when len(sh.run_duration) = 1 then '00000' + convert(varchar(8),sh.run_duration)end as ttfrom dbo.sysjobs sj with (nolock)inner join dbo.sysjobHistory sh with (nolock)on sj.job_id = sh.job_id where sj.name = 'My Agent Job'and [sh.Message] like '%The job%') a )b   Calculating the average run time We now select each run time in seconds from #rawdata1 and place the values into another temporary table called #rawdata2. Once again we create a ‘key’, a hardwired ‘1’. select 1 as Keyy, run_time_in_Seconds into #rawdata2 from #rawdata1The purpose of doing so is to make the average time AVG() available to the query immediately without having to do adverse grouping. Applying KPI Logic At this point, we shall apply some logic to determine whether processing times are within the norms. We do this by applying colour names. Obviously, this example is a super one for SSRS and traffic light icons.select rd1.run_date, rd1.run_time, rd1.run_time_in_Seconds ,Avg(rd2.run_time_in_Seconds) as Average_run_time_in_seconds,casewhenConvert(decimal(10,1),rd1.run_time_in_Seconds)/Avg(rd2.run_time_in_Seconds)<= 1.2 then 'Green' when Convert(decimal(10,1),rd1.run_time_in_Seconds)/Avg(rd2.run_time_in_Seconds)< 1.4 then 'Yellow' else 'Red'end as [color], Calculating the Average Run Time in Hours Minutes and Seconds and the end of the query. casewhen len(convert(varchar(2),Avg(rd2.run_time_in_Seconds)/(3600))) = 1 then '0' + convert(varchar(2),Avg(rd2.run_time_in_Seconds)/(3600))else convert(varchar(2),Avg(rd2.run_time_in_Seconds)/(3600))end + ':' + case when len(convert(varchar(2),Avg(rd2.run_time_in_Seconds)%(3600)/60)) = 1 then '0' + convert(varchar(2),Avg(rd2.run_time_in_Seconds)%(3600)/60)else convert(varchar(2),Avg(rd2.run_time_in_Seconds)%(3600)/60)end + ':' + case when len(convert(varchar(2),Avg(rd2.run_time_in_Seconds)%60)) = 1 then '0' + convert(varchar(2),Avg(rd2.run_time_in_Seconds)%60)else convert(varchar(2),Avg(rd2.run_time_in_Seconds)%60)end as [Average Run Time HH:MM:SS] from #rawdata2 rd2 innerjoin #rawdata1 rd1on rd1.keyy = rd2.keyygroup by run_date,rd1.run_time ,rd1.run_time_in_Seconds order by run_date descThe complete code example use msdbgo/*drop table #rawdata1drop table #rawdata2go*/select 1 as keyy,run_date,(substring(b.run_time,1,2)*3600) + (substring(b.run_time,4,2)*60) + (substring(b.run_time,7,2)) as run_time_in_Seconds,run_time into #rawdata1 from (select run_date,substring(convert(varchar(20),tt),1,2) + ':' +substring(convert(varchar(20),tt),3,2) + ':' +substring(convert(varchar(20),tt),5,2) as [run_time] from (select name,run_date, run_duration, casewhenlen(run_duration) = 6 then convert(varchar(8),run_duration)whenlen(run_duration) = 5 then '0' + convert(varchar(8),run_duration)whenlen(run_duration) = 4 then '00' + convert(varchar(8),run_duration)whenlen(run_duration) = 3 then '000' + convert(varchar(8),run_duration)whenlen(run_duration) = 2 then '0000' + convert(varchar(8),run_duration)whenlen(run_duration) = 1 then '00000' + convert(varchar(8),run_duration)end as ttfrom dbo.sysjobs sj with (nolock)innerjoin dbo.sysjobHistory sh with (nolock) on sj.job_id = sh.job_id where name = 'My Agent Job'and [Message] like '%The job%') a ) bselect 1 as Keyy, run_time_in_Seconds into #rawdata2 from #rawdata1select rd1.run_date, rd1.run_time, rd1.run_time_in_Seconds ,Avg(rd2.run_time_in_Seconds) as Average_run_time_in_seconds,casewhenConvert(decimal(10,1),rd1.run_time_in_Seconds)/Avg(rd2.run_time_in_Seconds)<= 1.2 then 'Green' when Convert(decimal(10,1),rd1.run_time_in_Seconds)/Avg(rd2.run_time_in_Seconds)< 1.4 then 'Yellow' else 'Red'end as [color],Case when len(convert(varchar(2),Avg(rd2.run_time_in_Seconds)/(3600))) = 1 then '0' + convert(varchar(2),Avg(rd2.run_time_in_Seconds)/(3600))else convert(varchar(2),Avg(rd2.run_time_in_Seconds)/(3600))end + ':' + case when len(convert(varchar(2),Avg(rd2.run_time_in_Seconds)%(3600)/60)) = 1 then '0' + convert(varchar(2),Avg(rd2.run_time_in_Seconds)%(3600)/60)else convert(varchar(2),Avg(rd2.run_time_in_Seconds)%(3600)/60)end + ':' + case when len(convert(varchar(2),Avg(rd2.run_time_in_Seconds)%60)) = 1 then '0' + convert(varchar(2),Avg(rd2.run_time_in_Seconds)%60)else convert(varchar(2),Avg(rd2.run_time_in_Seconds)%60)end as [Average Run Time HH:MM:SS] from #rawdata2 rd2 innerjoin #rawdata1 rd1on rd1.keyy = rd2.keyygroup by run_date,rd1.run_time ,rd1.run_time_in_Seconds order by run_date desc  

    Read the article

  • popen fails with "sh: <command>: not found"

    - by smallmeans
    I'm developing a server application and I recently encountered this wierd error on a testing server (Debian Squeeze). Every executable I pass to popen fails with a msg: sh: sort: not found // happens to any command This happens regardless whether I point to the full path returned by "type" or keep it short . As mentioned earlier, this happens at only one testing environment, to add confusion, am running the same OS and had no problem whatsoever. Popen is apparently using sh to execute commands, but if I run the same command thru the prompt (bash or sh), everything's fine Thanks in advance (PS: even tried Python os.popen just to nail this head scratcher, and it works!) Edit this is a simple call that fails: $command="tail -10 myfile"; $handle = popen($command.' 2>&1','r'); if($handle){ while (!feof($handle)){ ....//process buffer } } returns: sh: tail: not found

    Read the article

  • Resources to learn sh scripting 'just like a normal programming language'

    - by Homer J. Simpson
    Hi, what is the best resource (book would be nice) to learn sh scripting (the "standard" shell on Unix systems) just like when i would learn a "normal" programming/scripting language ? There are lots of tutorials on certain aspects of shell scripting, they mostly deal with shells in general and unix commands and so on, but i would rather like to find a more general approach - meaning a quick syntactic overview and an outlook on how to do things you normally do when programming, like implementing small algorithms and so on. Doing actual scripting, not just a structured batch file. And rather 100-liners than 1-to-3-liners. Can you recommend a good standard book on the topic ?

    Read the article

  • Installing e text editor

    - by kristian nissen
    I am trying to get e-text editor to run. I read http://www.e-texteditor.com/forum/viewtopic.php?p=14953#14953 and Compile e-text editor on Linux as well. But on my 10.04 Lucid it fails at the following step: ./build_externals_linux.sh debug with the following error messages: Building debug binaries Building 32-bit binaries Going to place output in /opt/etexteditor/external/out.debug ./build_externals_linux.sh: line 41: pushd: bakefile: No such file or directory ./build_externals_linux.sh: line 42: ./configure: No such file or directory Cannot compile bakefile ./build_externals_linux.sh: line 46: popd: directory stack empty ./build_externals_linux.sh: line 49: pushd: metakit: No such file or directory ./build_externals_linux.sh: line 50: cd: builds: No such file or directory Cannot compile MetaKit ./build_externals_linux.sh: line 56: popd: directory stack empty ./build_externals_linux.sh: line 59: pushd: pcre: No such file or directory ./build_externals_linux.sh: line 60: ./configure: No such file or directory Cannot compile pcre ./build_externals_linux.sh: line 66: popd: directory stack empty ./build_externals_linux.sh: line 69: pushd: tinyxml: No such file or directory make: *** No rule to make target `clean'. Stop. cannot compile TinyXML ./build_externals_linux.sh: line 77: popd: directory stack empty ./build_externals_linux.sh: line 80: pushd: libtommath: No such file or directory make: *** No rule to make target `clean'. Stop. Cannot compile LTM ./build_externals_linux.sh: line 85: popd: directory stack empty ./build_externals_linux.sh: line 88: pushd: libtomcrypt: No such file or directory make: *** No rule to make target `clean'. Stop. Cannot compile LTC ./build_externals_linux.sh: line 93: popd: directory stack empty ./build_externals_linux.sh: line 96: pushd: wxwidgets: No such file or directory ./build_externals_linux.sh: line 97: ./configure: No such file or directory Cannot compile wxWidgets ./build_externals_linux.sh: line 104: popd: directory stack empty ./build_externals_linux.sh: line 107: pushd: webkit: No such file or directory make: *** No rule to make target `clean'. Stop. ./build_externals_linux.sh: line 109: ./WebKitTools/Scripts/build-webkit: No such file or directory Cannot compile WebKit ./build_externals_linux.sh: line 113: popd: directory stack empty what am I missing?

    Read the article

  • Why does sh/bash set command line parameter values when trying to set environment variable?

    - by Touko
    A question on basics : While tuning environment variables for a program launched from a script, I ended up with somewhat strange behaviour with sh (which seems to be actually linked to bash) : variable setting seems to mess up with command-line parameters. Could somebody explain why does this happen? A simple script: #! /bin/sh # Messes with $1 ?? set ANT_OPTS=-Xmx512M export ANT_OPTS # Works # export ANT_OPTS=-Xmx512M echo "0 = $0" echo "1 = $1" When I run this with the upper alternative (set + export), the result is as following: $ ./test.sh foo 0 = ./test.sh 1 = ANT_OPTS=-Xmx512M But with lower alternative (export straight), the result is as I supposed: $ ./test.sh foo 0 = ./test.sh 1 = foo There is surely logical explanation, I just haven't figured it out yet. Somebody who does have idea? br, Touko

    Read the article

  • Ubuntu.sh on Android Phone

    - by pjtatlow
    So today I noticed something weird on my phone. I used a terminal emulator to see what I could do with it, and noticed that there is a file called ubuntu.sh. I tried to run it and got all sorts of permission denied errors, and then I decided to root my phone. But now I'm nervous to run it, does anyone know what it does or why it is there? edit I forgot to mention that I have an AT&T Morotola Atrix 4G running Android 2.3.6. Also when I use the app SSHDroid to go into my phone from my Ubuntu machine, I'm greeted with this: "The programs included with the Ubuntu system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. To access official Ubuntu documentation, please visit: http://help.ubuntu.com/" Also, here are the contents of ubuntu.sh #!/bin/sh export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib # make sure no left-over pidfiles, etc. ####################################### rm -fr /var/run/* rm -fr /var/lock/* chmod 666 /system/usr/keychars/* rm -f /tmp/tab* mkdir -p /home/adas/Desktop chmod 755 /home/adas/Desktop chown -R adas.adas /home/adas/Desktop [ -x /usr/bin/firefox-install-profile ] && /usr/bin/firefox-install-profile [ -x /usr/local/bin/check-citrix-certs.sh ] && /usr/local/bin/check-citrix-certs.sh [ -x /usr/bin/migrate-webapps ] && /usr/bin/migrate-webapps # boot scripts ############## /etc/init.d/rc S # lock down /var for CTS ######################## chown root.adas /var/tmp chown root.adas /var/lock chmod 775 /var/tmp chmod 775 /var/lock chmod 666 /dev/socket/dbus chmod 666 /dev/null # runlevel 2 scripts #################### /etc/init.d/rc 2 cp /sdcard/*.lic /data/ chmod 666 /data/*.lic This is really strange, any ideas?

    Read the article

  • executing .sh file from java program [migrated]

    - by user778900
    i have a .sh file stored in some linux system.the full path of the file is "/comviva/CPP/Kokila/TransactionHandler/scripts/stopTH.sh". i am tring to execute it by Runtime.getRuntime().exec("/comviva/CPP/Kokila/TransactionHandler/scripts/stopTH.sh"). but it is giving some exception. i want to execute that file from my java program in windows mechine. is it possible.?if yes then plese give me some code .. thanks koushik

    Read the article

  • Problem opening .sh file

    - by Lautré
    I'm trying to install Torchlight from the Humble Indie Bundle 6. The installation file is an sh file. When I try to run the sh file I get this output. [ user@pc:~/Desktop$ sudo sh ./Torchlight-2012-09-26.sh [sudo] password for user: Current temporary directory (usually /tmp by default) does not seem to be executable! Please specify an alternative path by using the --target option.] How do make the tmp dir executable or specify an alternate path? I'm running ubuntu 12.10

    Read the article

  • Problem with .sh file

    - by omgzor
    I don't have any experience writing .sh files. I want to run the pvm2raw utility of this app from the Volume Library. I get the following error when running build.sh in Ubuntu 10.10. build.sh is as follows: # make command set mmfile=V3Makefile set make="make -f $mmfile" set rule=$1 if ($rule == "") set rule="all" // line 16 if ($rule == "deps") then if ($HOSTTYPE == "iris4d") $make MAKEDEPEND="CC -M" OPTS="-DHAVE_CONFIG_H -DVIEWER_HAVE_DCMTK" TARGET=IRIX depend if ($HOSTTYPE == "i386") $make MAKEDEPEND="c++ -M -I/usr/X11R6/include" OPTS="-DHAVE_CONFIG_H -DVIEWER_HAVE_DCMTK" TARGET=LINUX depend What's wrong there? Edit: I followed kniwor's advice and installed csh. Now I get the following error: How can I solve this Undefined variable problem?

    Read the article

  • Need to run a .sh as root on boot or login

    - by Graymayre
    Still new with linux and running ubuntu 12.10 I have a wireless stick (ae2500) which has known issues that has been partially solved using ndiswrapper. However, to use it I must run the same scripts every time I reboot, effectively uninstalling and reinstalling the driver. I made a .sh file to run every time to make it easy, but I must do the sudo login everytime. There are three solutions I am looking for and although not all are necessary to solve this particular problem, I would still like to know them all for learning purposes. run scripts or file.sh on boot (as well as other programs) run scripts or file.sh automatically with root privileges make the install permanent so as not to have to go through the process every time. Any additional information that can help me regarding this that I did not think to ask (including streamlining my commands), or general knowledge, would be greatly appreciated. Following are the contents of the file. I pretty much just made it as I would have entered it. cd ~/ndiswrapper-1.58rc1 sudo modprobe -rf ndiswrapper sudo rm /etc/modprobe.d/ndiswrapper.conf sudo rm -r /etc/ndiswrapper/* sudo depmod -a sudo make uninstall sudo make sudo make install sudo ndiswrapper -i bcmwlhigh5.inf ndiswrapper -l sudo modprobe ndiswrapper

    Read the article

  • Tomcat startup.sh doesn't work

    - by OMG Ponies
    I've just installed Tomcat 6.0.20 (per Jira documentation recommendation) on RedHat EL 5 Server, and attempts to use: bin] # ./startup.sh ...result in: Using CATALINA_BASE: /opt/software/jira-tomcat-6.0.20 Using CATALINA_HOME: /opt/software/jira-tomcat-6.0.20 Using CATALINA_TMPDIR: /opt/software/jira-tomcat-6.0.20/temp Using JRE_HOME: /etc/alternatives/jre Usage: catalina.sh ( commands ... ) commands: debug Start Catalina in a debugger ... version What version of tomcat are you running? I've edited the catalina.sh file to add: echo $0 echo $1 ...and I see: catalina.sh start ...etc when I use: ./catalina.sh start Why does catalina.sh not use the parameter?

    Read the article

  • Create setenv.sh to set system property

    - by user3475398
    I have to use setenv.sh to set system properties. I am using Linux OS and Tomcat Server 6. As described here Linux Environment- setenv.sh , I have created a setenv.sh in tomcat/bin, and the only think I added is the export JAVA_OPTS =”-Dmyprojectvar.subname=value -Danothervariable=value -Danother.variable=value” I dont know, is this enough to set the properties. I just want to add three properties to tomcat as system property using setenv.sh. What should I do to complete it successfully? What are the steps for it?I saw this question setenv.sh is not working in http://stackoverflow.com/. No is answer given there and ,even ,I don't understand the question. ie, Do we need to set CATALINA_HOME and other properties somewhere in setenv.sh?.

    Read the article

  • UnsatisfiedLinkError on xawt when running HEC-HMS.sh

    - by G.Oxsen
    I am a recent adopter of Linux and this problem has got me stumped. I use HEC-HMS and HEC-DSSVue for work on a regular basis. I have been using the widows versions in wine but they are really buggy. So I decided to try out the linux versions. the links below will take you to the download pages for these two programs. They are free programs for Hydrology and data management. Once I install them and attempt to run the shell file (HEC-HMS.sh for example) I get a ton of java errors that I do not understand. If I had to guess I would say that the java files in question can not be found. When I check to see if java is installed it is. Here is the output from the terminal from trying to run HEC-HMS.sh: Exception in thread "Thread-1" java.lang.UnsatisfiedLinkError: /home/smythe/HEC/hec-hms35/java/lib/i386/xawt/libmawt.so: libXtst.so.6: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.load0(Unknown Source) at java.lang.System.load(Unknown Source) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at sun.security.action.LoadLibraryAction.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at sun.awt.NativeLibLoader.loadLibraries(Unknown Source) at sun.awt.DebugHelper.<clinit>(Unknown Source) at java.awt.Component.<clinit>(Unknown Source) at javax.swing.ImageIcon.<clinit>(Unknown Source) at hms.i.c(Unknown Source) at hms.i.b(Unknown Source) at hms.K.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Exception in thread "Thread-4" java.lang.UnsatisfiedLinkError: /home/smythe/HEC/hec-hms35/java/lib/i386/xawt/libmawt.so: libXtst.so.6: cannot open shared object file: No such file or directory at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.load0(Unknown Source) at java.lang.System.load(Unknown Source) at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at sun.security.action.LoadLibraryAction.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.awt.Toolkit.loadLibraries(Unknown Source) at java.awt.Toolkit.<clinit>(Unknown Source) at sun.print.CUPSPrinter.<clinit>(Unknown Source) at sun.print.UnixPrintServiceLookup.getDefaultPrintService(Unknown Source) at sun.print.UnixPrintServiceLookup.refreshServices(Unknown Source) at sun.print.UnixPrintServiceLookup$PrinterChangeListener.run(Unknown Source) Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit at java.awt.Color.<clinit>(Unknown Source) at hms.model.l.<init>(Unknown Source) at hms.model.ProjectManager.<init>(Unknown Source) at hms.Hms.<init>(Unknown Source) at hms.Hms.main(Unknown Source) Exception in thread "Thread-2" java.lang.NoClassDefFoundError: Could not initialize class sun.print.CUPSPrinter at sun.print.UnixPrintServiceLookup.getDefaultPrintService(Unknown Source) at javax.print.PrintServiceLookup.lookupDefaultPrintService(Unknown Source) at hms.util.f.run(Unknown Source) at java.lang.Thread.run(Unknown Source) I get similar outputs when I try to run HEC-DSSVue.sh. If anyone could shed some light on a solution I would really appreciate it. The problem turned out to be that the program needed 32 bit versions of the particular dependencies.

    Read the article

1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >