Search Results

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

Page 106/432 | < Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >

  • How to login as another user and then log out in bash script?

    - by Neuquino
    Hi, I need to write a bash script to do something as another user and then return to the initial user... Suppose I run the following as root: #!/bin/bash USER=zaraza su - "${USER}" #do some stuff as zaraza ________ #here I should logout zaraza #continue doing things as root In the console I should write "exit", but in bash is a keyword and it exits the script... Thanks in advance,

    Read the article

  • LuaInterface - how to register overloaded methods?

    - by JeffreySadeli
    Hello world! I'm trying to integrate Lua to my C# app when I hit a little snag. I was hoping someone with more expertise could help point me to the right direction. Let's say I have the following C# methods: public void MyMethod(int foo) { ... } public void MyMethod(int foo, int bar) { ... } I would like to register it to my Lua script environment so that I can do something like this: -- call method with one param MyMethod(123) -- call method with two params MyMethod(123, 456) I tried RegisterFunction("MyMethod", this, this.GetType().GetMethod("MyMethod")) but it reasonably complains about ambiguous match. Any ideas?

    Read the article

  • How to get number of rows deleted from mysql in schell script

    - by simonlord
    Hi all I can't work out how to get the mysql client to return the number of rows deleted to the shell when running a delete. Does anyone know what option will enable this? Or ways around it? Here's what i'm trying, but i get no output: #!/bin/bash deleted=`mysql mydb -e "delete from mytable where insertedtime < '2010-04-01 00:00:00'"|tail -n 1` I was expecting something like this as the output from mysql: deleted 999999 Which is why i have the tail -n 1 so i only pick up the count and not the column name. Any help would be most appreciated.

    Read the article

  • Deploying a Web Application from the command line

    - by Grant
    Hi. Im looking to deploy a web application on a build server. It is a very small web app and so far i have written a nice little console app that checks out from SVN and then calls msbuild on the .sln file. This of course is not the same as publishing a web app and so far have not found a programatic way of publishing. So my question is this.. After msbuild has run can i simply delete all .cs and .vb files and then deploy? or Should i really try and find a way to publish programatically?

    Read the article

  • Do I have to have an 'unregister' button on my users on an email altering application?

    - by Glycerine
    Hey guys - I know this is not a strictly programming question but I'm building an application where users sign up to traffic alerts. I have the whole thing dusted but I haven't got an 'unregister button' I know its good UI to have one, but I was hoping if someone knew the legalities of the topic? The user can sign in and uncheck what alerts to receive, but not scrub their details - On the email sent I have an unsubscribe button. Seeing as this is going to the public, can I turn round to my boss and say "by law we need one" else he might just turn around and try and charge the client, and I don't agree with that for something so rudimentary

    Read the article

  • Help with variables and new lines, and quoting in a bash script

    - by Scott
    I would like to automate the following svn command. Note this command produces the desired results on my system - Ubuntu 10.04, svn 1.6.6, bash shell, when issued from the command line: svn ci -m $'Added new File: newFile.txt\nOrig loc: /etc/networking/newFile.txt' /home/user/svnDir/newFile.txt I would like to run that command in a bash script, assuming that the original full path to the file is contained in the variable $oFileFull, and the filename is in $oFileName. The script is executed from the svn directory. I need to allow for the possibility that the file name and or path contain spaces. so the line inside my shel script might look like: svn ci -m$'Added new file: ${oFileName}\nOrig loc: ${oFileFull}' ${oFileName} But I want the variables (which may contain spaces) expanded before the command is executed, and I cannot figure out how to do this while enclosing the svn comment in single quotes which is necessary in order to get the new line in the subversion comment log. I am pulling my hair out trying to figure out how to properly quote and assemble this command. Any help appreciated.

    Read the article

  • Send mail from a Windows script

    - by Jörgen Lundberg
    I would like to send mail from a script on a Windows Server 2003 Standard Edition. I think the server setup is pretty much out of the box. The mail server is an Exchange one, and when you're on the internal network you can use plain old SMTP. I have done it from my machine with Perl, but unfortunately Perl is not available on the server. Is there an easy way of doing this from a .bat-file or any other way that doesn't require installing some additional software? Edit: Thanks for the quick replies. The "blat" thingie would probably work fine but with wscript I don't have to use a separate binary. I didn't see PhiLho's post the first time I edited and selected an answer. No need for me to duplicate the code here. Just save the script to a file, say sendmail.vbs, and then call it from the command prompt like so: wscript sendmail.vbs

    Read the article

  • Output only characters between [ABC] and [/ABC]

    - by user564530
    $ cat somefile.txt afsdfv asdf[ABC]dafga asdfasf yxcvyxv[/ABC] asdadf yv[ABC]sdfb sdfgadfg [/ABC]adf asdf $ cat somefile.txt | NEEDEDONELINER > output.txt dafga asdfasf yxcvyxv sdfb sdfgadfg $ So the "NEEDEDONELINER" only outputs the characters between a [ABC] and [/ABC]. [ABC] could occur several times, and there could be random characters around it. I only need the random chars between the [ABC] and [/ABC]. I don't have time to learn Perl :\ Thank you in anticipiation!

    Read the article

  • Regarding Shell variable

    - by arav
    I need to call another shell script testarg.sh within my main script. This script testarg.sh has arguments ARG1 ,ARG2, ARG3. I need to call up the below way ./testarg.sh -ARG1 -ARG2 -ARG3 ARG1 and ARG3 argument Variables are mandatory ones. If its not passed to the main script then i quit. ARG2 is an optional one. If the ARG2 variable is not set with value or it's not defined then i need not pass it from main script.So i need to call up the below way ./testarg.sh -ARG1 -ARG3 If the value exist for the ARG2 Varibale then i need to call the below way ./testarg.sh -ARG1 -ARG2 -ARG3 Do i need to have a if else statement for checking the ARG2 variable is empty or null. Is there any other way to do it.

    Read the article

  • shutdown.exe timer

    - by user311130
    hey, tryingto run shutdown.exe -l -t 10 only showed shutdown help manual. I thought of unekegant but working solution of ping -n 10 localhost shutdown.exe -l How wasty is is that solution? I thought of downloading sleep.exe, but I want my bat file to work on machine with no previuse preperations. any more ideas? Thanks

    Read the article

  • build.xml in ant

    - by Codenotguru
    > Can anybody help me know what these tags do in build.xml file? > > 1)<property file="" location="."/> > 2)<property environment=""/> > 3)<property name="" value=""/> 4)<path > id="classpath.base"> 5)<pathelement > location="$some.jar"/> 6)<path > id="classpath.build"> 7)<path > id="classpath.test"> > 8)<target></target> > > Thank You

    Read the article

  • Jquery dialog box - doesn't fade out before closing

    - by Broken Link
    I have div(box) on my page and I'm using this script to display div as dialog box. Inside that div I have a hyper link, On click of the hyper link I want to fade out the dialog box and close.. The content of the dialog fades out, but the border of the dialog box remains same. If I add $("#box").dialog('close') to the click function after fadeto there is no effect.. it just closes the dialog box completely. Any help? using jquery-ui-1.7.2 <script type="text/javascript"> $(document).ready(function(){ $("a#later").click(function () { $("#box").fadeTo('slow', 0); }) }); $(function () { $("#box").dialog({ autoOpen: true, width: 500, modal: true, }); }); </script>

    Read the article

  • Strange issue with jQueryUI and .htaccess RewriteRule

    - by dosboy
    I have the following rule in my .htaccess which redirects any requests for /labs/... to /projects/...: RewriteRule ^labs/(.+)$ projects/$1 [L] Where projects is a local folder on my web server. I'm using jQueryUI on a page in a subfolder of projects, say projects/project1/index.php. When I hit http://mydomain.com/projects/project1/ everything is fine. However if I hit http://mydomain.com/labs/project1/ almost everything is fine, except that I get the following warning in my JS console: Resource interpreted as image but transferred with MIME type text/html. ui-bg_highlight-soft_60_4ca20b_1x100.png And my jQueryUI button loses its glossy look. I don't even know where to begin to try to solve this. But if anyone has any suggestions I'd greatly appreciate it.

    Read the article

  • compare time using date command

    - by Andrei
    Say I want a certain block of bash script execute only if it is between 8 am (8:00) and 5 pm (17:00), and do nothing otherwise. The script is running continuously So far I am using date command. How to use it compare it current time within the range? Thanks

    Read the article

  • Receiving Text From Another Application

    - by Garry
    Hi, I'm building some home automation software with Cocoa/Objective-C. The main application will have a minimal GUI and will most likely be represented by a status bar icon only. I'm using proprietary speech-to-text software (MacSpeech Dictate) that takes my voice command and converts it to plain text. I then need to send this plain text to my app for parsing. Is there a way to send a string to a Cocoa application? Could AppleScript achieve this? How would I make the NSString string in my app "available" to receive the passed string? For reasons that are beyond the scope of this question - it is not possible to dictate the command directly into my app. Many thanks in advance,

    Read the article

  • How can I quickly sum all numbers in a file?

    - by Mark Roberts
    I have a file which contains several thousand numbers, each on it's own line: 34 42 11 6 2 99 ... I'm looking to write a script which will print the sum of all numbers in the file. I've got a solution, but it's not very efficient. (It takes several minutes to run.) I'm looking for a more efficient solution. Any suggestions?

    Read the article

  • GUNZIP / Extract file "portion by portion"

    - by Dave
    Hi. I'm on a shared server with restricted disk space and i've got a gz file that super expands into a HUGE file, more than what i've got. How can I extract it "portion" by "portion (lets say 10 MB at a time), and process each portion, without extracting the whole thing even temporarily! No, this is just ONE super huge compressed file, not a set of files please...

    Read the article

  • Use matching value of a RegExp to name the output file.

    - by fx42
    I have this file "file.txt" which I want to split into many smaller ones. Each line of the file has an id field which looks like "id:1" for a line belonging to id 1. For each id in the file, I like to create a file named idid.txt and put all lines that belong to this id in that file. My brute force bash script solution reads as follows. count=1 while [ $count -lt 19945 ] do cat file.txt | grep "id:$count " >> ./sets/id$count.txt count='expr $count + 1' done Now this is very inefficient as I have do read through the file about 20.000 times. Is there a way to do the same operation with only one pass through the file? - What I'm probably asking for is a way to use the value that matches for a regular expression to name the associated output file.

    Read the article

  • Parallel processing from a command queue on Linux (bash, python, ruby... whatever)

    - by mlambie
    I have a list/queue of 200 commands that I need to run in a shell on a Linux server. I only want to have a maximum of 10 processes running (from the queue) at once. Some processes will take a few seconds to complete, other processes will take much longer. When a process finishes I want the next command to be "popped" from the queue and executed. Does anyone have code to solve this problem? Further elaboration: There's 200 pieces of work that need to be done, in a queue of some sort. I want to have at most 10 pieces of work going on at once. When a thread finishes a piece of work it should ask the queue for the next piece of work. If there's no more work in the queue, the thread should die. When all the threads have died it means all the work has been done. The actual problem I'm trying to solve is using imapsync to synchronize 200 mailboxes from an old mail server to a new mail server. Some users have large mailboxes and take a long time tto sync, others have very small mailboxes and sync quickly.

    Read the article

< Previous Page | 102 103 104 105 106 107 108 109 110 111 112 113  | Next Page >