Search Results

Search found 10789 results on 432 pages for 'ui scripting'.

Page 111/432 | < Previous Page | 107 108 109 110 111 112 113 114 115 116 117 118  | Next Page >

  • Shell Script Variable Quoting Problem

    - by apinstein
    I have an sh script that contains the line $PHP_COMMAND -r 'echo get_include_path();' I can not edit this script, but I need the eventual command line to be (equivalent to) php -d include_path='/path/with spaces/dir' -r 'echo get_include_path();' How can I achieve this? Below is a script that demonstrates the problem. #!/bin/sh # shell script quoting problem demonstration # I need to be able to set a shell variable with a command with # some options, like so PHP_COMMAND="php -d 'include_path=/path/with spaces/dir'" # then use PHP_COMMAND to run something in another script, like this: $PHP_COMMAND -r 'echo get_include_path();' # the above fails when executed. However, if you copy/paste the output # from this line and run it in the CLI, it works! echo "$PHP_COMMAND -r 'echo get_include_path();'" php -d include_path='/path/with spaces/dir' -r 'echo get_include_path();' # what's going on? # this is also interesting echo "\n--------------------" # this works great, but only works if include_path doesn't need quoting PHP_COMMAND="php -d include_path=/path/to/dir" echo "$PHP_COMMAND -r 'echo get_include_path();'" $PHP_COMMAND -r 'echo get_include_path();' echo "\n--------------------" # this one doesn't when run in the sh script, but again if you copy/paste # the output it does work as expected. PHP_COMMAND="php -d 'include_path=/path/to/dir'" echo "$PHP_COMMAND -r 'echo get_include_path();'" $PHP_COMMAND -r 'echo get_include_path();' Script also available online: http://gist.github.com/276500

    Read the article

  • Random password variable disappears

    - by snaken
    Hi, I'm using the following to generate a random password in a shell script: DBPASS=</dev/urandom tr -dc A-Za-z0-9| (head -c $1 > /dev/null 2>&1 || head -c 8) When i run this in a file on its own like this: #!/bin/sh DBPASS=</dev/urandom tr -dc A-Za-z0-9| (head -c $1 > /dev/null 2>&1 || head -c 8) echo $DBPASS A password is echoed. When i incorporate it into a larger script though the variable never seems to get created for some reason, so for example this doesn't work: DBPASS=</dev/urandom tr -dc A-Za-z0-9| (head -c $1 > /dev/null 2>&1 || head -c 8) sed -i s/oldpass/$DBPASS/ mysql_connect.php If i manually set the variable though everything is fine.. can anyone see why?

    Read the article

  • how to run few vim commands in a raw

    - by temujin.ya.ru
    Hello. This is really noob question. There is set of vim commands : command1 : command2 etc., which I would neet to type in in a raw quite often. How to I make it automatic? It is simple regexp replace command set, however I cannot script those in sed, since it involves non-latin locales and for some reason vim handles non-latin regexps correctly, while sed not.

    Read the article

  • Please help me with a Power shell Script which rearranges Paths.

    - by Hamish Grubijan
    Hi, I have both Sybase and MSFT SQL Servers installed. There is a time when Sybase interferes with MS SQL because they have they have some overlapping commands. So, I need two scripts: A) When runs, script A backs up the current path, grabs all paths that contain sybase or SYBASE or SyBASE (you get the point) in them and move them all at the very end of the path, while preserving the order. B) When it runs, script B restores the path from back-up. Both script a and script b should affect the path immediately. So, if a.bat that calls patha.ps1, pathb.ps1 looks like so: @REM Old path here call patha.ps1 @REM At this point the effective path should be different. call pathb.ps1 @REM Effective old path again Please let me know if this does not make sense. I am not sure if call command is the best one to use. I have never used P.S. before. I can try to formulate the same thing in Python (I know S.O. users tend to ask for "What have you tried so far"). Well, at this point I am VERY slow at writing anything in Power Shell language. Please help.

    Read the article

  • How to set PATH to another variable value with spaces in Windows batch file

    - by Evgeny
    I've got a Windows batch script issue that I'm bashing my head against (no pun intended). The problematic script looks like this: if defined _OLD_VIRTUAL_PATH ( set PATH=%_OLD_VIRTUAL_PATH% ) When I run it and _OLD_VIRTUAL_PATH is set I get: \Microsoft was unexpected at this time. _OLD_VIRTUAL_PATH is a variable that was originally set from PATH and it contains spaces - I'm pretty sure that's the problem. But what's the solution? It runs successfully if I enclose it in quotes, but I don't think the entire value of the PATH variable is supposed to be in quotes.

    Read the article

  • Why is order important in moving from tab to tab programmatically (and new in 1.8.10

    - by Bruce
    Hi folks, Up until I updated to jquery-ui-1.8.10 (already using jQuery 1.5), the following code has worked as expected: case 'baseeditor': $('#tab1').html(responseText).fadeIn(500, function() { ... load the contents of the tab and stuff... }); $("#prolearn").tabs("select",1); break; case ... The tab is fueled and then focus is moved from tab0 (from where the ajax call is initiated) to tab1. Now, that code won't work, but this version does: case 'baseeditor': $("#prolearn").tabs("select",1); $('#tab1').html(responseText).fadeIn(500, function() { ... load the contents of the tab and stuff... }); break; case ... Can someone explain the difference - have I just been lucky getting away with my original version? Thanks/Bruce

    Read the article

  • How to script a URL screenshot without X?

    - by cwopen
    I'd like to automate a 'screenshot' of arbitary URL's using a Linux build that doesn't have X installed. There appears to be some (costly) web services to do this, but I specifically want something I can do locally. Tried imagemagick without much success, though Mozilla used to have a command line option to do it?

    Read the article

  • Self-modify the classpath within a Scala script?

    - by Alex R
    I'm trying to replace a bunch of Linux shell scripts with Scala scripts. One of the remaining challenges is how to scan an entire directory of JARs and place them into the classpath. Currently this is done in the shell script prior to invoking the scala JVM. I'd like to eliminate the shell script completely. Is there an elegant scala idiom for this? I have found this other question but in Java it seems hardly worthwhile to mess with it: http://stackoverflow.com/questions/252893/how-do-you-change-the-classpath-within-java

    Read the article

  • Allow users to enter a variable length list of items in asp.net form

    - by EJB
    I need to let my users enter a variable length list of items into something that looks like a grid view (or a series of standard text boxes stacked vertically). Each item could be a few characters or a few hundred characters long, and I just want them to enter a "sentence", and then tab to the next row, and always having another blank one ready to go at the bottom of the list. I don't want to save any data to my SQL Server DB until they enter the entire list and then click on a "save all" button. When they hit the "save all" button they will be given a preview screen where the data will be presented as standard HTML ordered list. If they confirm/save, then each row of the grid will then be saved as a separate row into my SQL Server database (with an index to remember the order). What ASP.Net (or Jquery/javascript) UI control would be the best to use in this situation?

    Read the article

  • Enter a letter when prompted by another command

    - by kij
    Hi all, I'm trying to automate the installation and deployement of an application. To do it, i have a shell script with the following instructions: /usr/local/bin/amf install -u $1 -p $2 $localTarget where $1, $2 and $localTarget are options for the command named 'amf'. The problem is that the 'amf' command make severall instructions and ask the user to enter a letter during those instructions (to confirm the installation). At the moment, i can't bypass or modify the behaviour of the 'amf' command, so my question is: How can i catch this behaviour and/or automatically enter a letter in my script. This behaviour currently make my script not working, because the 'amf instal...' instruction is followed by another command to start my application. But as the install failed, the application can't start. Thanks in advance for your help. Best regards. Kij.

    Read the article

  • Is there a jquery clone of ext.js' toolbar?

    - by fbuchinger
    I'm looking for a jquery equivalent of ext.js' toolbar (http://dev.sencha.com/deploy/dev/examples/menu/menus.html). To be more precisely, my requirements are the following: the toolbar should consist of iconic and textual buttons and dropdown widgets buttons should either trigger actions directly or open submenus buttons and submenus should have the ability to remember the last selected state buttonsets should group multiple buttons and only allow one of them to be active In short words, I'm looking for a real toolbar in jquery and not for some modified site menu. I experimented with the button/buttonset/menu widget in jquery ui 1.9m2, but found its IE performance rather poor. It also felt awkward to combine these isolated widgets into a logically connected toolbar. Does anyone know of a better jquery toolbar plugin?

    Read the article

  • How do I daemonize an arbitrary script in unix?

    - by dreeves
    I'd like a daemonizer that can turn an arbitrary, generic script or command into a daemon. There are two common cases I'd like to deal with: I have a script that should run forever. If it ever dies (or on reboot), restart it. Don't let there ever be two copies running at once (detect if a copy is already running and don't launch it in that case). I have a simple script or command line command that I'd like to keep executing repeatedly forever (with a short pause between runs). Again, don't allow two copies of the script to ever be running at once. Of course it's trivial to write a "while(true)" loop around the script in case 2 and then apply a solution for case 1, but a more general solution will just solve case 2 directly since that applies to the script in case 1 as well (you may just want a shorter or no pause if the script is not intended to ever die (of course if the script really does never die then the pause doesn't actually matter)). Note that the solution should not involve, say, adding file-locking code or PID recording to the existing scripts. More specifically, I'd like a program "daemonize" that I can run like % daemonize myscript arg1 arg2 or, for example, % daemonize 'echo `date` >> /tmp/times.txt' which would keep a growing list of dates appended to times.txt. (Note that if the argument(s) to daemonize is a script that runs forever as in case 1 above, then daemonize will still do the right thing, restarting it when necessary.) I could then put a command like above in my .login and/or cron it hourly or minutely (depending on how worried I was about it dying unexpectedly). NB: The daemonize script will need to remember the command string it is daemonizing so that if the same command string is daemonized again it does not launch a second copy. Also, the solution should ideally work on both OS X and linux but solutions for one or the other are welcome. (If I'm thinking of this all wrong or there are quick-and-dirty partial solutions, I'd love to hear that too.)

    Read the article

  • Text replacement for multiple script/config files

    - by user343804
    I am doing some sort of science with a combination of Python, bash scripts and configuration files with weird syntaxes from old C programs. To run different tests, I have to tune (open text file, edit and save) a number of these files, but it is getting harder and harder to remember which files to edit. Also, the tasks are very repetitive and I end having a bunch of comment lines, switching on and off the settings for a specific run. I dream of a tool that can keep a list of files (regardless of the file format) and allow me to centrally choose from a predefined list of "profiles", taking care of editing the script/config files. For example lets say I have a config and script file: config.cfg var1 = 1.0 #var1 = 1.5 script.sct function(200.0) #function(300.0) I would like to instead have auxiliary text files: config.cfg.tem var1 = $$var1$$ script.sct.tem function($$par1$$) and in a central script or even better, a GUI, just switch from profile1 (e.g. var1=1.0,par1=200.0) to profile2 (e.g. var1=1.5,par1=300.0), and the tool to automatically update the text files. Any idea if such a tools exists?

    Read the article

  • How can I get awk input from a file and add my own text to the data?

    - by xs2dhillon
    Assume that I have a text file separated by colons. I understand how to display the entire text file or any specific column using awk. However, what I want to do is to get the awk output and then display it by adding my own text using a shell script? For example, assume that my text file is: England:London:GMT USA:Washington:EST France:Paris:GMT What I want to do is to display this input into the below format: COUNTRY: England CAPITOL: London TIMEZONE: GMT COUNTRY: USA CAPITOL: Washington TIMEZONE: EST COUNTRY: France CAPITOL: Paris TIMEZONE: GMT

    Read the article

  • Using // in a <script>'s source

    - by Dan Beam
    Hello fellow front-end web h4X0|2s, I was wondering if anyone had any resources, proof, or personal experience in using the age-old http/https JavaScript hack: <script src="//someserver.com/js/script.js"></script> Has anyone encountered issues in any of these browsers (IE 5.5+, FF2+, Chrome, Opera 9+, Safari 3+)? Has anybody had success stories? Thank you for your help.

    Read the article

  • How to perform an action when a remote (Http) file changed?

    - by ZeissS
    Hi, I want to create a script that checks an URL and perform an action (download + unzip) when the "Last-Modified" header of the remote file changed. I thought about fetching the header with curl but then I have to store it somewhere for each file and perform a date comparison. Does anyone have a different idea using (mostly) standard unix tools? thanks

    Read the article

  • PHP system() help

    - by sea_1987
    Hello, I have this shell script #!/bin/sh ############################################################# # Example startup script for the SecureTrading Xpay4 client # # Install Xpay4 into /usr/local/xpay4 # # To run this script automatically at startup, place the # # following line at the end of the bootup script. # # eg. for RedHat linux: /etc/rc.d/rc.local # # # # /usr/local/xpay4/xpay4.sh # ############################################################# # Configuration options # Path to java executable JAVAPATH=/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home ########## Do not alter anything below this line ########## echo "Starting Xpay4. Please ensure the Xpay4 client is not already running" $JAVAPATH/java -jar /usr/local/xpay4/Xpay4.jar /usr/local/xpay4/xpay4.ini & And I am trying to run it using, system("/x/sh/shell.sh"); I am doing this when a user navigates to a certain page on my site, however I am getting just a white blank screen is there a way to error check with system(), I am currently using error_reporting(E_ALL | E_STRCIT) and that is applied site wide

    Read the article

  • Controlled hyperlink hijaxing

    - by Izmoto
    I am working on a web application. I have a data grid with a 'commands' column that has hyperlinks for some common CRUD operations (Edit, Delete, etc). When a user clicks on say the Edit hyperlink, I retrieve the unique identifier for the data grid row and load a modal form dialog (i am using jQuery UI) so the user is able to edit the row data and subsequently close the modal form dialog at which point I refresh the page. Now, before the page is done refreshing, there's a chance that a user might click on the edit link again, and whenever that happens, 'hijaxing' fails. My question is how can i check that if a user clicks on a hyperlink and the page is refreshing, i delay until it is done refreshing, then i allow the 'hijax' to kick in.

    Read the article

  • How to run command in the background and notify me via email when done

    - by Abs
    Hello all, I have the following command which will take ages to run (couple of hours). I would like to make it a background process and for it to send me an email when its done. For the cherry on the top, any errors it encountered should write to a text file when an error has occurred? find . -type f -name "*.rm" -exec ./rm2mp3.sh \{} \; -exec rm \{} \; How can I do this with my above command?

    Read the article

< Previous Page | 107 108 109 110 111 112 113 114 115 116 117 118  | Next Page >