Search Results

Search found 9122 results on 365 pages for 'dynamic scripting'.

Page 97/365 | < Previous Page | 93 94 95 96 97 98 99 100 101 102 103 104  | Next Page >

  • how to make the batch file wait until another batch file completes execution?

    - by Arunachalam
    how to make the batch file wait until another batch file completes execution? let me explain with an example. echo hi >r.txt echo some piece of code >>r.txt start ar.bat echo some piece of coe >>ar.txt i want the code after start ar.bat to execute after this batch file exits .. i have tried without start it works but i want to run it in a seperate window ..is there any function to check whether that window which is running ar.bat is present ?

    Read the article

  • How to force emacs to use \n instead of \r\n

    - by User1
    I have to use windows to write some shell scripts. I decided to use emacs, but I get a weird error when running the script: /bin/bash^M: bad interpreter: No such file or directory Correct me if I'm wrong, but that looks like the shebang ends in \r\n instead of just \n. How can I tell emacs to only write \n? I'm in Shell-script major mode. It's quite surprising this isn't fixed by default.

    Read the article

  • Good book for learning Bourne shell?

    - by John Isaacks
    I want to learn how to write shell scripts. Particularly I want to write a svn post-commit script to upload files from a test server to a production server. I am sure I will want to write more as I get more into it. I have very little linux/unix knowledge. Can anyone recommend a good book?

    Read the article

  • Ruby - Read file in batches

    - by Algorist
    Hi, I am reading a file that is 10mb in size and which contains some id's. I read them into a list in ruby. I am concerned that it might cause memory issues in the future, when the number of id's in file might increase. Is there a effective way of reading a large file in batches? Thank you

    Read the article

  • Python CLI tool - general parsing question

    - by WinkyWolly
    If possible I would like to use the following structure for a command however I can't seem to figure out how to achieve this in Python: ./somescript.py arg <optional argument> -- "some long argument" Would it be possible to achieve this in a feasible manner without too much dirty code? Or should I just reconsider the syntax (which is primarily preference). Thanks!

    Read the article

  • document.getElementByID - checking whether an element has been found or not

    - by be here now
    Hi, guys. Here's a sample code, that opens an internet explorer window, navigates to google, and gets some element on the page by its unique id: set ie = CreateObject("InternetExplorer.Application") ie.navigate("www.google.com") ie.visible = true while ie.readystate <> 4 wscript.sleep 100 WEnd set some_object = ie.document.getelementbyid("xjsc") MsgBox some_object.tagname, 0 This sample brings me a DIV popup, which satisfies me completely. But at the next step I'd like to check whether some id exists in the page, or not. Unfortunately, I can't just be, like, set some_object = ie.document.getelementbyid("some_non_existant_id") if some_object.tagname = "" then ... because it gives me the following error: ie.vbs(12, 1) Microsoft VBScript runtime error: Object required: 'some_object' So, what's the best practice to check whether an element has been found or not?

    Read the article

  • start-stop-daemon quoted arguments misinterpreted

    - by Martin Westin
    Hi, I have been trying to make an init script using start-stop-daemon. I am stuck on the arguments to the daemon. I want to keep these in a variable at the top of the script but I can't get the quotations to filter down correctly. I'll use ls here so we don't have to look at binaries and arguments that most people wont know or care about. The end result I am looking for is for start-stop... to run ls -la "/folder with space/" DAEMON=/usr/bin/ls DAEMON_OPTS='-la "/folder with space/"' start-stop-daemon --start --make-pidfile --pidfile $PID --exec $DAEMON -- $DAEMON_OPTS Double escaping the options and trying innumerable variations of quotations do not help... Then they end up at the daemon they are always messed up. Enclosing $DAEMON_OPTS in quotes changes things... then they are seen as one since quote... never the right number though :) Echoing the command-line (start-stop...) prints exactly the right stuff to screen. But the daemon (the real one, not ls) complains about the wrong number of arguments. How do I specify a variable so that quotes inside it are brought along to the daemon correctly? Thanks, Martin

    Read the article

  • Tool to create UI for Linux (Gnome) shell scripts

    - by stwissel
    I'm writing a bunch of Linux shell scripts with complex selections. For now I use zenity for prompts. I'd rather use something where I can show more than one UI element at a time and query it in a script (e.g. a list and some checkboxed and a file picker and an entry field. What are my options?

    Read the article

  • Git Status Across Multiple Repositories on a Mac

    - by eapen
    I have been searching for a solution to this for a while and have not found quite what I need. I have several Git Repositories in a folder on my Mac (OSX 10.6) and would like a script or tool that will loop through all the repositories and let me know if any of them needs "commit"-ing. This is my structure Sites   /project1   /project2   /project3 I want the tool to do a "git status" in Sites/project1, Sites/project2, Sites/project3 and let me know if Sites/project2 and Sites/project3 have changes or new files and needs to be Staged/committed The closest script I found that might be hackable is here: http://gist.github.com/371828 but even that script wouldn't run and I get an error: "syntax error near unexpected token `do" which might have been written for *nix.

    Read the article

  • Shell script to copy files

    - by Hulk
    If there exist a directory, /backup/ And the files in it are a.gz b.gz c.gz And another directory /backup-directorybackup And the files in it are a.gz I need a shells script to compare two directories if the files are present then ignore it and if the filesare not present copy it to the destination directory Thanks..

    Read the article

  • Posting a download to bitbucket from a shell script

    - by Isaac
    I'd like to be able to fully-automate the process of packaging the release of an application (in Xcode) via shell script and I'd like the zip archive that is released to be a download on bitbucket. Is there a way to programmatically make a (zip) file available as a download on bitbucket?

    Read the article

  • How to hide the console of batch scripts without losing std err/out streams

    - by cooper.thompson
    My question is similar to Running a CMD or BAT in silent mode, but with one additional constraint. If you use WshScript.Run in vbscript, you lose access to the standard in/error/out streams of the process. WshScript.Exec gives you access to the standard streams, but you can't hide your windows. How can you have your cake (hide the windows) and eat it too (have direct access to the console streams)? I'm currently thinking about a C++ executable which creates a new Windows Station and Desktop, (see MSDN) and runs a specified script within that new Desktop (I'm not yet an expert on Window Stations and Desktops, so this idea may be retarded). This idea is based loosely on Condor's USE_VISIBLE_DESKTOP feature, which, if disabled, runs Condor jobs in a non-visible Desktop. I haven't quite figured out if this requires elevated priveledge. The tradeoff of this approach is that your script can disappear into limbo if it blocks on user input. Does anyone have any additional ideas? Or feedback on the approach outlined above? Edit: Also, the purpose of our script is to set up the user environment, so running as another user, or as a system scheduled task isn't really an option (unless there are clever tricks I don't know about).

    Read the article

  • Get Json and output to text file undecoded

    - by Gary
    Hi, I want to fetch json script and write it to a txt file undecoded, exactly how it was originally. I do have a script that I use that I am modifying but unsure what to commands to use. This script decodes, which is what I want to advoid. //Get Age list($bstat,$bage,$bdata) = explode("\t",check_file('./advise/roadsnow.txt',60*2+15)); //Test Age if ( $bage > $CacheMaxAge ) { //echo "The if statement evaluated to true so get new file and reset $bage"; $bage="0"; $file = file_get_contents('http://somesite.jsontxt'); $out = (json_decode($file)); $report = wordwrap($out->mainText, 100, "\n"); //$valid = $out->validTo; //write the data to a text file called roadsnow.txt $myFile = "./advise/roadsnow.txt"; $fh = fopen($myFile, 'w') or die("can't open file"); $stringData = $report; fwrite($fh, $stringData); } else { //echo the test evaluated to false; file is not stale so read local cache //print "we are at the read local cache"; $stringData = file_get_contents("./advise/roadsnow.txt"); } // if/else is done carry on with processing //Format file $data = $stringData

    Read the article

  • Regarding grep in solaris

    - by Arav
    I want grep for a particular work in multiple files. Multiple files are stored in variable testing. TESTING=$(ls -tr *.txt) echo $TESTING test.txt ab.txt bc.txt grep "word" "$TESTING" grep: can't open test.txt ab.txt bc.txt Giving me an error. Is there any other way to do it other than for loop

    Read the article

  • Assigning a material in Blender with a script

    - by Narcolapser
    Question: How do you assign a material with a script to an object in blender? Info: I have this script to import a proprietary model type of mine that is basically a star map with object consisting of a single vertex. in order to make them look like stars and be visible they are all going to have a halo material assigned to them. I'm figuring out how to make this material and give it the values just fine, but I can't seem to get it to assign. I tried the most obvious thing which was: objectName.setMaterial(materialName) but that did nothing. and when i would take an object that had a material and call the getMaterial function on it, it would return nothing. there is something I'm missing here, can some one shed some light on it? Thanks. ~TA

    Read the article

  • Capture log4J output with grep

    - by Fork
    Hi, I know that log4j by default outputs to stderror. I have been capturing the out put of my application with the following command: application_to_run 2> log ; cat log | grep FATAL Is there a way to capture the output without the auxiliary file?

    Read the article

  • Iterating over each line of ls -l output

    - by Ivan
    I want to iterate over each line in the output of ls -l /some/dir/* Right now I'm trying: for x in ls -l $1; do echo $x done, however this iterates over each element in the line seperately, so i get -r--r----- 1 ivanevf eng 1074 Apr 22 13:07 File1 -r--r----- 1 ivanevf eng 1074 Apr 22 13:17 File2 I want to iterate over each line as a whole, though. How do I do that? Thanks.

    Read the article

  • run program multiple times using one line shell command

    - by teehoo
    I have the following gifs on my linux system: $ find . -name *.gif ./gifs/02.gif17.gif ./gifs/fit_logo_en.gif ./gifs/halloween_eyes_63.gif ./gifs/importing-pcs.gif ./gifs/portal.gif ./gifs/Sunflower_as_gif_small.gif ./gifs/weird.gif ./gifs2/00p5dr69.gif ./gifs2/iss013e48788.gif ...and so on What I have written is a program that converts GIF files to BMP with the following interface: ./gif2bmp -i inputfile -o outputfile My question is, is it possible to write a one line command using xargs, awk, find etc. to run my program once for each one of these files? Or do I have to write a shell script with a loop?

    Read the article

  • Get Active Directory Attributes for Users on Legacy Exchange Servers

    - by Jason Hindson
    I would like to create a CSV file of the users on our Exchange 2003 servers, and include some attributes from their AD account. In particular, I would like to pull certain AD values for the users with RecipientTypeDetails = LegacyMailbox. I have tried a few different methods for targeting and filtering (ldapfilter, filter, objectAttribute, etc.) these users, with little success. The Exchange 2003 PowerPack for PowerGUI was helpful, but permissions issues and using the Exchange_Mailbox class are not challenges I want to overcome. I was finally able to create a working script, but it is very slow. The script I've created below is currently working, although it is on track to take about 4+ hours to complete. I'm am looking for suggestions for improving the efficiency of my script or otherwise obtaining this data in a quicker manner. Here is the script: $ADproperties = 'City','Company','department','Description','DistinguishedName','DisplayName','FirstName','l','LastName','msExchHomeServerName','NTAccountName','ParentContainer','physicaldeliveryofficename','SamAccountName','useraccountcontrol','UserPrincipalName' get-user -ResultSize Unlimited -ignoredefaultscope -RecipientTypeDetails LegacyMailbox | foreach {Get-QADUser $_.name -DontUseDefaultIncludedProperties -IncludedProperties $ADproperties} | select $ADproperties | epcsv C:\UserListBuilder\exchUsers.csv -notype Any help you can provide will be greatly appreciated!

    Read the article

  • Check if a program exists in bash

    - by ~rojanu
    I am trying to check if md5sum or digest exists on solaris and script is used on different machines. Here is the function in sh script which is called from a ksh script getMD5cmd () { PATH="${PATH}:/bin:/usr/bin:/usr/sfw/bin:/usr/local/bin:/usr/sbin/bin" if type -p md5sum;then MD5CMD=`type -p md5sum` elif type -p digest;then MD5CMD="`type -p digest` -a md5" fi echo "HERE ${MD5CMD}" } When I run scripts I get -p not found md5sum not found -p not found digest is /bin/digest HERE However, when I type it in a terminal, works as exptected Any Ideas? Thanks

    Read the article

  • Bash script to insert code from one file at a specific location in another file?

    - by Kurtosis
    I have a fileA with a snippet of code, and I need a script to insert that snippet into fileB on the line after a specific pattern. I'm trying to make the accepted answer in this thread work, but it's not, and is not giving an error so not sure why not: sed -e '/pattern/r text2insert' filewithpattern Any suggestions? pattern (insert snippet on line after): def boot { also tried escaped pattern but no luck: def\ boot\ { def\ boot\ \{ fileA snippet: LiftRules.htmlProperties.default.set((r: Req) => new Html5Properties(r.userAgent)) fileB (Boot.scala): package bootstrap.liftweb import net.liftweb._ import util._ import Helpers._ import common._ import http._ import sitemap._ import Loc._ /** * A class that's instantiated early and run. It allows the application * to modify lift's environment */ class Boot { def boot { // where to search snippet LiftRules.addToPackages("code") // Build SiteMap val entries = List( Menu.i("Home") / "index", // the simple way to declare a menu // more complex because this menu allows anything in the // /static path to be visible Menu(Loc("Static", Link(List("static"), true, "/static/index"), "Static Content"))) // set the sitemap. Note if you don't want access control for // each page, just comment this line out. LiftRules.setSiteMap(SiteMap(entries:_*)) // Use jQuery 1.4 LiftRules.jsArtifacts = net.liftweb.http.js.jquery.JQuery14Artifacts //Show the spinny image when an Ajax call starts LiftRules.ajaxStart = Full(() => LiftRules.jsArtifacts.show("ajax-loader").cmd) // Make the spinny image go away when it ends LiftRules.ajaxEnd = Full(() => LiftRules.jsArtifacts.hide("ajax-loader").cmd) // Force the request to be UTF-8 LiftRules.early.append(_.setCharacterEncoding("UTF-8")) } }

    Read the article

  • Web Application Scanner

    - by rajesh
    I want to develop a Web applications to collect or exchange sensitive or personal data, this system would give user a detailed automated report on : • How secure user's website is? • How easily it can be hacked? • Where exactly is the problem and • What are the remedies? Any suggestions????

    Read the article

< Previous Page | 93 94 95 96 97 98 99 100 101 102 103 104  | Next Page >