Search Results

Search found 25663 results on 1027 pages for 'script programmer'.

Page 48/1027 | < Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >

  • Ubuntu 8.04 wont reboot from script

    - by Littlejon
    I have a script that is run to backup a server via Rsync, after that script is run I want the server to reboot. My script is run as root from the Crontab at 3am in the morning. #!/bin/bash HOST="email" RSYNC_OPTS="-a -v -v --progress --stats --delete" RSYNC_DEST="10.0.0.10::$HOST" BACKUP_LIST="/etc /home /root" TIMESTAMP="/timestamp-bkup-start.chk" TIMESTAMP2="/timestamp-bkup-stop.chk" touch $TIMESTAMP rsync $RSYNC_OPTS $TIMESTAMP $RSYNC_DEST for BACKUP_ITEM in $BACKUP_LIST; do rsync $RSYNC_OPTS $BACKUP_ITEM $RSYNC_DEST done /etc/init.d/zimbra stop sleep 60s rsync $RSYNC_OPTS /opt $RSYNC_DEST touch $TIMESTAMP2 rsync $RSYNC_OPTS $TIMESTAMP2 $RSYNC_DEST echo `date +%Y%m%d%H%M` >> /var/log/reset reboot # $# shows number of args passed # $1 to access first variable #if [ $# -eq 1 ]; then # if [ $1 = "withreboot" ]; then # echo "rebooting..."; # echo `date +%Y%m%d%H%M` >> /var/log/reset # /sbin/reboot # fi #fi I have tried using init 6 rather then reboot. I have tried /sbin/reboot. I also have another basic script that just echos to the reset log and runs reboot without issue. It is just with the script above the server wont restart. If anyone has any theories that would be great as I have run out of idea. Thanks, Jon

    Read the article

  • How to debug old initd script under systemd?

    - by Gene Vincent
    I have an older initd script to start my application. It worked fine under older versions of SuSE, but fails on Open SuSE 12.3. The strange thing is cd /etc/init.d ; ./script start works fine. /etc/init.d/script start shows a redirection to systemctl, but doesn't start my application (and also doesn't show any output from the initd script). I don't see any log entries showing me what goes wrong. The only entry I see is in /var/log/messages saying the application was started. How do I debug this ?

    Read the article

  • Find the php script thats sending mails

    - by adam
    Hi, Is there any way for me to find the php script that is sending emails. I have apache+php ( no mod_suphp neither suexec ) in a "standard" install, and i want to find out witch php script is sending emails, when i check the logs i just see the uid of the user that's sending the emails ( in my case apache ) but i want to find out the script that's originated the email. Is it possible or i must install suexec or mod_suphp to keep trac of that ? Thks for the help.

    Read the article

  • /etc/rc.local doesn't execute apache tomcat startup script on boot

    - by user119720
    I'm having some problem with my centOS machine.I want to insert a line inside the rc.local to execute apache tomcat on startup. Below are the configuration for /etc/rc.local #!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. touch /var/lock/subsys/local /opt/apache-jakarta/bin/startup.sh Unfortunately,the apache tomcat does not start on the boot time. I've already execute the script manually and it is working without any issues. Is there any specific syntax to put script inside the rc.local?Or did I forgetting something?Please Advice.Thanks. EDIT: My boot.log only show this output: Dec 17 21:04:53 localhost NET[2969]: /sbin/dhclient-script : updated /etc/resolv.conf

    Read the article

  • Running a script at startup as root?

    - by Usman Ajmal
    Hi i developed a script which I set to run at startup i.e. when the Desktop appears. In the script I mounted a partition using sudo mount /dev/sda1 /mnt &> result.txt After executing script a file named result.txt was created which contained sudo: no tty present and no askpass program specified In other words the mounting failed. If I run the script using sudo ./myProgram i don't face this problem and the drive gets mounted successfully. Any suggestions please....

    Read the article

  • Automating the installation using SSH

    - by RAY
    I am running a bash script from a remote host to run a binary file which installs 64 bit JDK 6 update 29 on multiple VMs across the Environment. It is installing the file but, at the last line i have to hit a enter to complete the installation. I want to fully automate the script where i do not have to hit the enter at the last line. This is what i am using ssh ${V_TIERS}@${V_TIERS} 'cd JDK; sh jdk-6u29-solaris-sparcv9.sh' It updates as desired, but during install i have to hit enter to continue and complete the installation. Can anybody please help to fully automate the update process.

    Read the article

  • Run script on login with ssh

    - by user912447
    I have a feeling this is quite easy to do but every solution found on google has to do with adding a script to be run whenever someone logs into the machine. What I am looking for is a way to run a script when only I log into the machine. I ssh into a shared computer and need to have it load a couple modules for me and I imagined the easiest way to do this would to just run a script on login. Is there a simple way?

    Read the article

  • Team Foundation Server - A programmer's guide

    - by Filip Ekberg
    In addition to my Previous topic on How to use SVN, Branch? Tag? Trunk? I would like to get in-depth on how a programmer should/could use TFS. The things that are most interesting to me is not how to set up the server, rather how you use it on a daily basis. In the area of software engineering where your responsibility not only lies on code but achitecture, documentation and other fields, you need to have a collection of your work, prefferably on the same place. So these are my point of interest which I would like to get more knowledge about How would you strucuter a TFS Workspace / Project to support lots of different customers / projects and maybe different projects per customer? Splitting up the folder strucutre on the above project into different pieces such as, Code, Documents - Architecture, Requirements and other, what more could there be and what would be a nice commonly used folder structure? An easy to browse repository; Again the folder structure here is important however this point is more aimed at different Explorers for the repository, not only the built in Team Foundation Explorer. These are just a couple of the points that I would like to know more about, suggestions on Beginners guides, in-depth guides and links covering the above would be very much helpful, please feel free to add other important knowledge-points to this as well.

    Read the article

  • What's it like being a financial programmer?

    - by Mike
    As a student who's done an internship at a Silicon Valley company(non-financial), I'm curious to know what it's like working for a financial company doing software development. I'd expect the hours to be longer, and the pay to be higher. Specifically, I have the following questions: What's the work/life balance really like? Are you expected to work 80 hours a week most weeks? For those who have worked in non-financial software engineering jobs, how does being a financial software engineer compare in terms of work/life balance? How much does it pay? I'm curious as to starting(i.e. just got a BS) pay, as well as "top out" pay. (I'd prefer concrete numbers - ballpark is fine). Also, bonuses would be useful information. What jobs do financial programmers typically have? Are most just general software engineers, or do people typically have very specialized(i.e. AI or systems) backgrounds? Also, do most programmers have PhDs? Are programmers typically required to be at work, or are financial companies generally flexible about letting programmers work from home? When at work, do programmers have to dress formally? What are the technology environments like? Are finance companies using state-of-the-art hardware and software, or are they generally more conservative in upgrading their equipment? What programming languages are typically used? If VBA(shudder) is used, is it a large part of a finance company's workflow? If you could turn back the clock, would you still be a financial programmer? I'm going to keep this post open a little bit longer to get some more responses.

    Read the article

  • PHP programmer wanting to learn Flash game development

    - by grokker
    Hi! I'm currently a PHP programmer and one of my childhood dreams is to create a game. A game to show my friends or my children when the time comes :) The problem is I don't know Flash. I'm not great at drawing stuff or even artistic. I could program a little with Javascript and I could consider myself intermediate with jQuery. So my question is, how do I get started? What books do I read first? What's the steps that I should take on this journey? Thank you SO friends. I hope you all could help me create something I could be proud of :) P.S. I'm just assuming that Flash is the easiest way to create and show to other people my game. Anyway I'm very open for other suggestions! My game in mind is a side scroller about an indiana jones type of character and the setting is on the jungle with trees and snakes and a lot of animals!

    Read the article

  • How to overcome the programmer's block ?

    - by Nicolas Dorier
    How do you do when, during the development of your application, you can't decide yourself what to do next. You have no problem technically speaking, you have no problem to write clean code BUT you have a problem to decide yourself on what to code now. And you spend time thinking and thinking again on your design, in the car, in the shower, and you cannot write a single line of code... I think we call this "analysis paralysis". I hate being in this state ! How can you avoid this ? How do you do to not fall in this state ? I think this occurs when we are writting a big chunk of code with no visible improvement, but I'm not sure... UPDATE Like some of you said, this problem is also what we call the "programmer's block" (analogy with the writer's block). Doing some TDD doesn't help because I'm stuck, I can't decide myself what class to code, what methods to put inside (even a name of method). Though I admit that it helps to break a big chunk of code into smaller ones. Like Talesh said my head becomes full of "what-if".

    Read the article

  • Should a programmer have mastery over C++

    - by Yogendra
    I was wondering if it is necessary for programmers to have expertise on at least 1 programming language? Programming languages like C#, java, VB.Net etc change every year or two. Should a programmer have mastery over C++, which is a stable language and rarely undergoes changes? I am a C# developer and using it for about 7 years now, I still don't have mastery on it. EDIT I think my question is being misunderstood. I am not against changes or evolution. I love the new features and abstraction provided by languages such as C#, VB, Java. And I keep waiting for new features if it makes a programmers life easy. But this fact also make this languages very difficult to master. They are continuously evolving. Languages like C++ have slow evolution cycle. So given this scenario, Is it helpful to be master of C++? This is what my original question meant. Note:- Based on the answers by friends below, I have understood that languages and framework are tools for expressing the concepts. Also it might be a good idea to express the concepts in different programming languages.

    Read the article

  • How to push further as a programmer?

    - by MaXX
    For the last, hmm, 6 months I've been reading into Programming in C, I got myself K&Rv2, BEEJ's socket guide, Expert C programming, Linux Systems Programming, the ISO/IEC 9899:1999 specification (real, and not draft). After receiving them from Amazon, I got Linux installed, and got to it. I'm done with K&R, about halfway through Expert C Programming, but still feel weak as a programmer, I'm sure it takes much more than 6 months of reading to become truly skilled, but my question is this: I've done all the exercises in K&Rv2 (in chapter 1) and some in other chapters, most of which are generally really boring. How do I lift my skills, and become truly great? I've invested money, time and a general lifestyle for something I truly desire, but I'm not sure how exactly to achieve it. Could someone explain to me, perhaps if I need to continuously code, what exactly I'm to code? I'm pretty sure, coding up hello world programs isn't going to teach me any more than I already know about anything. A friend of mine said "read" (with emphasis on read) a man page a day, but reading is all I do, I want to do, but I'm not sure what! I'm interested in security, but I'm not sure as a novice what to code that would be considered enough. Ah, I hope you don't delete this paste :) Thanks

    Read the article

  • Am I a dinosaur programmer?

    - by dlb
    I have been a professional programmer for more than 30 years, and have chosen a career path involving hands-on programming. Programming is something that I love, and I take great pride in the fact that I have continued to keep up to date with current technology. Projects on which I have worked include large enterprise projects as well as smaller desktop programs. The problem I am facing is that I do not have any web-based experience other than some web services. Most of the jobs now available have some web component. I have now been out of work for a year and a half, and have been keeping busy by studying technology that will bridge that gap: CSS, Java Script, JQuery, and Ruby on Rails; AJAX is next. Hiring managers give no consideration whatsoever to the studying that I have been doing. I know that I cannot compete at a senior software level, but companies will not hire someone with my experience at a more junior level. Is there any way to break out of this Catch 22?

    Read the article

  • How to run a powershell script within a DOS batch file

    - by Don Vince
    How do I have a powershell script embedded within the same file as a DOS batch script? I know this kind of thing is possible in other scenarios: Embedding SQL in a DOS batch script using sqlcmd and a clever arrangements of goto's and comments at the beginning of the file In a *nix environment having a the name of the program you wish to run the script with on the first line of the script commented out e.g. #!/usr/local/bin/python There may not be a way to do this - in which case I will have to call the separate powershell script from the launching DOS script. One possible solution I've considered is to echo out the powershell script, and then run it. A good reason to not do this is that part of the reason to attempt this is to be using the advantages of the powershell environment without the pain of, for example, DOS escape characters I have some unusual constraints and would like to find an elegant solution. I suspect this question may be baiting responses of the variety: "why don't you try and solve this different problem instead." Suffice to say these are my constraints, sorry about that. Any ideas? Is there a suitable combination of clever comments and escape characters that will enable me to achieve this? Some thoughts on how to achieve this: A carat ^ at the end of a line in DOS is a continuation - like an underscore in VB An ampersand & in DOS typically is used to separate commands echo Hello & echo World results in 2 echos on separate lines %0 will give you the script that's currently running So something like this (if I could make it work) would be good: # & call powershell -psconsolefile %0 # & goto :EOF /* From here on in we're running nice juicy powershell code */ Write-Output "Hello World" Except... It doesn't work... because the extension of the file isn't as per powershell's liking: Windows PowerShell console file "insideout.bat" extension is not psc1. Windows PowerShell console file extension must be psc1. DOS isn't really altogether happy with the situation either - although it does stumble on '#' is not recognized as an internal or external command, operable program or batch file.

    Read the article

  • Calling python from Java?

    - by griffin
    I'm trying to call Jython from a Java 6 application using javax.script: import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; import javax.script.ScriptException; public class jythonEx { public static void main (String args[]) throws ScriptException { ScriptEngineManager mgr = new ScriptEngineManager(); ScriptEngine pyEngine = mgr.getEngineByName("python"); try { pyEngine.eval("print \"Python - Hello, world!\""); } catch (Exception ex) { ex.printStackTrace(); } } } This is causing a NullPointerException: java.lang.NullPointerException at jythonEx.main(jythonEx.java:12) Does anyone have any idea what I'm doing wrong here?

    Read the article

  • Drag and Drop to a Powershell script

    - by Nathan Hartley
    I thought I had an answer to this, but the more I play with it, the more I see it as a design flaw of Powershell. I would like to drag and drop (or use the Send-To mechanism) to pass multiple files and/or folders as a array to a Powershell script. Test Script #Test.ps1 param ( [string[]] $Paths, [string] $ExampleParameter ) "Paths" $Paths "args" $args I then created a shortcut with the following command line and dragged some files on to it. The files come across as individual parameters which first match the script parameters positionally, with the remainder being placed in the $args array. Shortcut Attempt 1 powershell.exe -noprofile -noexit -file c:\Test.ps1 I found that I can do this with a wrapper script... Wrapper Script #TestWrapper.ps1 & .\Test.ps1 -Paths $args Shortcut Attempt 2 powershell.exe -noprofile -noexit -file c:\TestWrapper.ps1 Has anyone found a way to do this without the extra script?

    Read the article

  • perl: Run remote perl script through SSH and query environment variables on remote machine

    - by kakyo
    I'm running a perl script through SSH, in the perl script I query environment variables using $ENV{MY_VAR_NAME} and it works fine when run locally. But through SSH, all environment variables become unset. I also tried to run system("source ~/.bash_profile"); at the beginning of my script to no avail. Any tips? EDIT: Rephrasing my question. I have machine A and B. I ran my perl on machine B, trying to get the environment variables on B and it worked. Then I ssh from A to B running the same script, i.e., using this code ssh user@B perl myscript.pl This time the environment variables on B are all blank. Any tips? UPDATE: I found that running the above script, ~/.bashrc on Machine B was invoked, but after setting environment variables in ~/.bashrc, run the above command again and still I don't see any environment variables. Also, if my perl script contains only echo $ENV{PATH} Then I get /usr/bin:/bin:/usr/sbin:/sbin

    Read the article

  • Jquery broken by GetResponse (email marketing) web form script

    - by Jacob
    I'm working on a site that relies on quite a bit of javascript. The problem is, I'm not a javascript guru in the least. Yes, bit off more than I can chew, here. I'm using jquery for a spy effect, and use GetResponse for email signups. If I implement my GetResponse script, it breaks the area later in the page which depends on the jquery script. Pull the GetResponse script and it works just fine. Problem is, I need them both. ;) The trick, I suppose, is that the GetResponse script is actually another Jquery script, so it's getting called twice... Any help? The site is http://djubi.com/testserver Check out (urlabove)/nogetresponsescript.php to see it work without the GetResponse script. You should be able to see all the source just fine. Thanks everyone. jf

    Read the article

  • Calling Python from Java through scripting engine (jython)?

    - by griffin
    I'm trying to call Jython from a Java 6 application using javax.script: import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; import javax.script.ScriptException; public class jythonEx { public static void main (String args[]) throws ScriptException { ScriptEngineManager mgr = new ScriptEngineManager(); ScriptEngine pyEngine = mgr.getEngineByName("python"); try { pyEngine.eval("print \"Python - Hello, world!\""); } catch (Exception ex) { ex.printStackTrace(); } } } This is causing a NullPointerException: java.lang.NullPointerException at jythonEx.main(jythonEx.java:12) Does anyone have any idea what I'm doing wrong here? Edit: Thanks for the responses! I added jython.jar to the classpath and it runs properly: java -cp "./;jython.jar" jythonEx

    Read the article

  • Executing <script> elements inserted with .innerHTML

    - by phidah
    I've got a script that inserts some content into an element using innerHTML. The content could for example be: <script type="text/javascript">alert('test');</script> <strong>test</strong> Problem is that the code inside the <script> tag doesn't get executed. I googled it a bit but there were no apparent solutions. If I inserted the content using jQuery $(element).append(content);the script parts got eval'd before being injected into the DOM. Has anyone got a snippet of code that executes all the <script> elements? The jQuery code was a bit complex so I couldn't really figure out how it was done.

    Read the article

  • Javascript HTML and Script injection issue in IE

    - by MartinHN
    Hi I have a javascript variable containing escaped HTML. There can be script tags inside the HTML, like this: var valueToInsert = "%3Cscript%20type%3D%22text/javascript%22%3Ealert%28%27test%27%29%3B%3C/script%3E%0A%3Cscript%20type%3D%22text/javascript%22%20src%3D%22http%3A//devserver/testinclude.js%22%3E%3C/script%3E%0A%3Cimg%20src%3D%22http%3A//www.footballpictures.net/data/media/131/manchester_united_logo.jpg%22%20/%3E" I want to append this to the DOM, and get all the javascript fired as expected. Right now I'm using this approach: var div = document.createElement("div"); div.innerHTML = unescape(valueToInsert); document.body.appendChild(div); In IE, at the time i set div.innerHTML - all script tags are removed. If I use jQuery to and do this: $(document.body).append(valueToInsert) It all works fine. Bad thing is, that I cannot use jQuery as this code will be added to sites I'm not in control of using some "already-implemented" script includes. Does someone have a trick? If jQuery can do it, it must be possible? I had another issue in Opera. I changed the injection script to be this: (still doesn't work in IE) var div = document.createElement("div"); div.innerHTML = unescape(valueToInsert); var a = new Array(); for (var i = 0; i < div.childNodes.length; i++) a.push(div.childNodes[i]); for (var i = 0; i < a.length; i++) { if (a[i].nodeName == "SCRIPT" && a[i].getAttribute("src") != null && a[i].getAttribute("src") != "" && typeof (a[i].getAttribute("src")) != "undefined") { var scriptTag = document.createElement("script"); scriptTag.src = a[i].getAttribute("src"); scriptTag.type = "text/javascript"; document.body.appendChild(scriptTag); } else if (a[i].nodeName == "SCRIPT") { eval(a[i].innerHTML); } else { document.body.appendChild(a[i]); } }

    Read the article

  • ssh script gives "key_read" error

    - by lugte098
    I'm using a script that connects to a cluster through ssh and sends some commands, then quits the connection. This script basically connects once using ssh, then executes a script in this session. This script loops through a list of commands a few times and after it is finished, the connection is terminated. So this script works fine, except for the fact that after a few loops it gives me the following error at loop 22. And then again at loop 32. The loops do exactly the same thing, so i cannot grasp the problem the script is facing. This is the error: key_read: uudecode AAAAB3NzaC1yc2EAAAABIwAAAQEAxmNx2hcXLpTjuaa3yKC3B9gbF7KprP2/ CH8fBgMbCyIcOB+ZMQDmEnbVTqedBwV/mxjZzorEpHTM8MX2WsTjFsxwzDgcpuxm+3cwfb0WSy9Y4Kb F8crAsRDbBIpUZ2n/iSdRcds9nTjk6PA61kTS24RLACHpqF18vudlO5WcbCOnAwa+DdUs0Raw29UiQc BaC6M4YPnApq9Ayy7a6qFI2uK6efkwfLTZIDivWlIdLpRLEyuBEpozQQhEd0mrGhR/ Gl1GevRvFMms14130xQ4A5UpJSn6CmrRIWBkcgp1TilqDGQ1F5xZOinnc4C00gFrbT3hkkQqY5A9p node023,10.141.0.31 ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAxmNx2hcXLpTjuaa3yKC3 B9gbF7KprP2/CH8fBgMbCyIcOB+ZMQDmEnbVTqedBwV/mxjZzorEpHTM8MX2WsTjFsxwzDgcpuxm+ 3cwfb0WSy9Y4KbF8crAsRDbBIpUZ2n/iSdRcds9nTjk6PA61kTS24RLACHpqF18vudlO5WcbCOnAw a+DdUs0Raw29UiQcBaC6M4YPnApq9Ayy7a6qFI2uK6efkwfLTZIDivWlIdLpRLEyuBEpozQQhEd0m rGhR/Gl1GevRvFMms14130xQ4A5UpJSn6CmrRIWBkcgp1TilqDGQ1F5xZOinnc4C00gFrbT3hkkQqY5 A9pa0lQHFkSw==

    Read the article

  • how to install ipv4 via a cmd windows xp

    - by Kevin Babb
    I need to script a way to install IPV4 on windows xp the reason is i have many pc with a corrupt win sock registry so the fix Microsoft has is to delete the reg keys hklm/system/currentcontolset/services/winsock and winsock2 and then to run a netsch ip reset which creates the winsock2 part of the registry then the part i need to script is go to network adapter properties goto tcpip and install a new protocol and select tcp/ip and install it which uses the file c:\windows\inf\nettcpip.inf and then this creates the winsock part is there a way to script this part?? i have looked and cant find anything

    Read the article

  • Powershell 2.0 - Running scripts for the command line call vs. from the ISE

    - by Gromix
    Hi, After writing deployment scripts from within the ISE, we need our CI server to be able to run them automatically, i.e. from the command line or via a batch file. I have notice some significant differences between the following calls: powershell.exe -File Script.ps1 powershell.exe -Command "& '.\Script.ps1'" powershell.exe .\Script.ps1 Some simple examples: When using -File, errors are handled in the exact same way as the ISE. The other two calls seem to ignore the $ErrorActionPreference variable, and do not catch Write-Error in try/catch blocks. When using pSake: The last 2 calls work perfectly Using the ISE or the -File parameter will fail with the following error: The variable '$script:context' cannot be retrieved because it has not been set Could someone help me understand the implications of each syntax, and why they are behaving differently? I would ideally like to find a syntax that works all the time and behaves like the ISE. Thanks, Romain

    Read the article

< Previous Page | 44 45 46 47 48 49 50 51 52 53 54 55  | Next Page >