Search Results

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

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

  • grep from a log file to get count

    - by subodh1989
    I have to get certain count from files. The grep statement i am using is like this : counter_pstn=0 completed_count_pstn=0 rec=0 for rec in `(grep "merged" update_completed*.log | awk '{print $1}' | sed 's/ //g' | cut -d':' -f2)` do if [ $counter_pstn -eq 0 ] then completed_count_pstn=$rec else completed_count_pstn=$(($completed_count_pstn+$rec)) fi counter_pstn=$(($counter_pstn+1)) done echo "Completed Orders PSTN Primary " $completed_count_pstn But the log file contains data in this format : 2500 rows merged. 2500 rows merged. 2500 rows merged. 2500 rows merged.2500 rows merged. 2500 rows merged. 2500 rows merged. As a result , it is missing out the count of one merge(eg on line 4 of output).How do i modify the grep or use another function to get the count. NOTE that the 2500 number maybe for different logs. So we have to use "rows merged" pattern to get the count. i have tried -o ,-w grep options,but it is not working. Expected output from above data: 17500 Actual output showing : 15000

    Read the article

  • How can I automate new system provisioning with scripts under Mac OS X 10.6?

    - by deeviate
    I've been working on this for days but simply cannot find the correct references to make it work. The idea is to have a script that will baseline newly purchased Macs that comes into the company with basic stuffs like set autologin to off, create a new admin user (for remote admins to access for support, set password to unlock screensaver and etc) . Sample list for baseline that admins have to do on each new machine: Click the Login Options button Set Automatic Login: OFF Check: Show the Restart, Sleep, and Shutdown buttons Uncheck: Show input menu in login window Uncheck: Show password hints Uncheck: Use voice over in the login window Check: Show fast user switching menu as Short Name (note: this is only part of a long list to do on each machine) I've managed to find some references to make some parts work. Like autologin can be unset with: defaults write /Library/Preferences/.GlobalPreferences com.apple.userspref.DisableAutoLogin -bool TRUE and I've kinda found ways to muscle in a new user creation (including prompts) with AppleScript and shell commands. But generally its tough finding ways to do somewhat simple things like turn on password to get out of screensaver or to allow fast user switching. References are either too limited or just no where to be seen (e.g. I can unset autologin via cli but the very next setting on the system preference "show restart, sleep and shutdown buttons" is somewhere else and I can't find any command line to make it set) Does anyone have any ideas on a list, document, reference or anything of where each setting on the system resides so that I can be pointed to make it work? or maybe sample scripts for the above example... My thanks for reading thus far—a huge thank you for whoever that has any info on the above.

    Read the article

  • Writing a script with the cmd prompt.

    - by Josh
    I'm trying to make a script that will place a list (in a .csv file) of processes that are running that take up more than 10 mb of RAM and shows the time + date the script was run. My teacher did this during his lecture but I can't remember how he did it. Just trying to figure out how to be better at IT. So my question is, can anyone help me with this? I don't even know where to start.

    Read the article

  • Python vs Groovy vs Ruby? (based on criteria listed in question)

    - by Prembo
    Considering the criteria listed below, which of Python, Groovy or Ruby would you use? Criteria (Importance out of 10, 10 being most important) Richness of API/libraries available (eg. maths, plotting, networking) (9) Ability to embed in desktop (java/c++) applications (8) Ease of deployment (8) Ability to interface with DLLs/Shared Libraries (7) Ability to generate GUIs (7) Community/User support (6) Portability (6) Database manipulation (3) Language/Semantics (2)

    Read the article

  • Using directory traversal attack to execute commands

    - by gAMBOOKa
    Is there a way to execute commands using directory traversal attacks? For instance, I access a server's etc/passwd file like this http://server.com/..%01/..%01/..%01//etc/passwd Is there a way to run a command instead? Like... http://server.com/..%01/..%01/..%01//ls ..... and get an output? EDIT: To be clear here, I've found the vuln in our company's server. I'm looking to raise the risk level (or bonus points for me) by proving that it may give an attacker complete access to the system

    Read the article

  • Why is it when I set "closeOnEscape" to false and then "closeOnEscape" to true jquery dialog escape

    - by chobo2
    Hi I am using jquery ui 1.8 and I have a model dialog that popups up and if a user clicks on a checkbox another one comes up. This requires them to say "yes" or "no" so I removed the "X" on the dialog and put closeOnEscape to false. However I noticed when I did that the model dialog underneath it would close when they hit escape. So now when the one that pops up when the checkbox is checked I disable closeOnEscape on the first dialog box. When they close it I enable again yet it does not work. I am not sure why $("#Dialog").dialog( "option", "closeOnEscape", true); I even do this in firebug. I just open my first dialog up Do this in firebugs console $("#Dialog").dialog( "option", "closeOnEscape", false); Then verify that escape is now disabled. I then try to enable it again $("#Dialog").dialog( "option", "closeOnEscape", true); Yet it never enables.

    Read the article

  • Same script, working on a site, not working on the other!

    - by Tioneb
    Hello, First of all I apologize in advance for this question, a bit off the rang of stackoverflow, but I've spend a day trying to solve that issue and I'm totally stuck. The issue: The search function of my script (php) works perfectly fine on one host but not on the other. If you search something here : edu-cafe.com, you'll get a result, just as it should be. However, try a search on this site, hosted somewhere else : code-reduc.com, exact same script, files and datable, and it just hang. I've asked both the host and the original programmer of the script to look at the issue but they can't seem to find an answer... Obviously the cause of my troubles comes from the Host, but I can't find the issue Any bit of help would be hugely appreciated! PS: part of the script here: http://codepaste.net/fuymqn Thanks!

    Read the article

  • I want the actual file name that is returned by a PHP script

    - by Aymon Fournier
    I am writing a python script that downloads a file given by a URL. Unfortuneatly the URL is in the form of a PHP script i.e. www.website.com/generatefilename.php?file=5233 If you visit the link in a browser, you are prompted to download the actual file and extension. I need to send this link to the downloader, but I can't send the downloader the PHP link. How would I get the full file name in a usable variable?

    Read the article

  • jQuery accordion: is there a way to make the scrollbar fit the displayed panel?

    - by Cheeso
    I have a jQuery accordion (jQuery 1.3.2, jQuery UI 1.7.2), with between 3-12 content panels. Some of the content panels are large, and have lots of content. some are small, and have only a little. When I expand any of them, the scrollbar on the div containing the accordion (it's got css overflow: auto;) is set as if the largest of the panels is expanded. Let's say I have 3 panels. One has 3 lines of content, one has 20 lines, and one has 1000 lines. If I expand either of the first two, the scrollbar indicator gets very very tiny, and moves all the way to the top, even though there is nothing worth scrolling. Is there a way to fix this? It seems like autoHeight:false ought to do it, but that doesn't work for me.

    Read the article

  • Why doesn't "cd" work in a bash shell script?

    - by askgelal
    I'm trying to write a small script to change the current directory to my project directory: #!/bin/bash cd /home/askgelal/projects/java I saved this file as proj, changed the chmod, copied it to /usr/bin. When I call it by: proj, it does nothing. What am I doing wrong?

    Read the article

  • Passing partial arguments in tcshell

    - by R S
    Hey, I'm writing a shell script (tcsh) that is supposed to received 3 parameters or more. The first 3 are to be passed to a program, and the rest are supposed to be passed to another program. All in all the script should look something like: ./first_program $1 $2 $3 ./second program [fourth or more] The problem is that I don't know how to do the latter - pass all parameters that are after the third.

    Read the article

  • A more flexible and agile compiled language - possible?

    - by sdudo
    I have a short question that I have been thinking about for some time now so why shouldn't I ask it here on SO: Is it theoretically possible to create a compiled, yet more agile, flexible and rapid-development-friendly language? If so: Where would be the pros and cons? Why isn't there one yet?

    Read the article

  • Elegant way to search for UTF-8 files with BOM?

    - by vog
    For debugging purposes, I need to recursively search a directory for all files which start with a UTF-8 byte order mark (BOM). My current solution is a simple shell script: find -type f | while read file do if [ "`head -c 3 -- "$file"`" == $'\xef\xbb\xbf' ] then echo "found BOM in: $file" fi done Or, if you prefer short, unreadable one-liners: find -type f|while read file;do [ "`head -c3 -- "$file"`" == $'\xef\xbb\xbf' ] && echo "found BOM in: $file";done It doesn't work with filenames that contain a line break, but such files are not to be expected anyway. Is there any shorter or more elegant solution? Are there any interesting text editors or macros for text editors?

    Read the article

  • Footprint of Lua on a PPC Micro

    - by Adam Shiemke
    We're developing some code on Freescale PPC micros (5517 and 5668 at the moment), and I was wondering if we could put Lua on them. The devices need to be easily programmed/reconfigured in the field, and the current product uses a proprietary interpreted logic language that can be loaded in, and our software (written in C) runs an interpreter. I would like to move to a better language (the implementation is a bit buggy and slow), so I'm considering Lua, but the memory footprint must be very low. For the 5517 (which we may not use), the maximum RAM is 80K. Things are better on the 5668, with 592K of RAM. So does anyone know if I can put Lua on bare metal? We're effectively not running an OS. If so, are there any estimates on what kind of memory footprint we might see? How much effort it would take? Failing this, does anyone know of any kind of interpreter that might be better in a memory-constrained environment without an OS? Or are we better just rolling our own?

    Read the article

  • How to determine if a C++ usertype has been registered with tolua

    - by czuger
    We use tolua++ to generate Lua bindings for C++ classes. Assume I have a C++ class: class Foo { //Some methods in Foo, irrelevant to question. }; and a tolua .pkg file with the following contents class Foo { }; Consider the following function: void call_some_lua_function(lua_State* luaState) { Foo* myFoo = new Foo(); tolua_pushusertype(luaState, (void*)myFoo, "Foo"); //More code to actually call Lua, irrelevant to question. } Now, the actual question: tolua_pushusertype causes a segfault in Lua if the 3rd parameter does not correspond to a valid fully qualified string of a C++ class that was registered with a call to tolua_cclass. So, if parameter 3 where "Bar", we get a segfault. What I would like to do is the following: void call_some_lua_function(lua_State* luaState) { //determine if tolua is aware of my type, how to do this? //Something like: //if(!tolua_iscpptype_registered("Foo")) //{ // abort gracefully //} Foo* myFoo = new Foo(); tolua_pushusertype(luaState, (void*)myFoo, "Foo"); //More code to actually call Lua, irrelevant to question. } Is there a way to do this using tolua?

    Read the article

  • How to get line count from variable (from MYSQL query)?

    - by Mint
    My problematic code: testMYSQL=`mysql -u $mysqlUser -p$mysqlPass -h $mysqlHost --skip-column-names --batch -D $mysqlDB -e "SELECT $select FROM $mysqlTable WHERE nameTXT='test';"` $testMYSQL now contains: test test test Then I do: TEST=$(echo $testMYSQL | wc -l) echo "$TEST" I would of thought that would work, but it doesn't, it returns 1 But if I put this into $testMYSQL: "test\ntest\ntest" it will say 3… Whats going on here? does MYSQL not use new lines? PS, I know I can use a for loop to loop though the lines then count up the lines that way, but I was hoping for a simpler solution like wc

    Read the article

  • Would Python make a good substitute for the Windows command-line/batch scripts?

    - by Lawrence Johnston
    I've got some experience with Bash, which I don't mind, but now that I'm doing a lot of Windows development I'm needing to do basic stuff/write basic scripts using the Windows command-line language. For some reason said language really irritates me, so I was considering learning Python and using that instead. Is Python suitable for such things? Moving files around, creating scripts to do things like unzipping a backup and restoring a SQL database, etc.

    Read the article

  • Can return and else statements be used interchangable in CFScript?

    - by Mel
    I would like to know your opinion on using return and else statements interchangeably in CFScript. I generally use the following syntax: if (something) { // Do something } else { // Do something else } It recently occurred to me I could do this instead: if (something) { // Do something return; } // Do something else Would those two styles yield a different end result? I like not having to wrap code in an else statement. My thinking is that if the if statement evaluates true and returns, the code below it will not run. If it does not evaluate true, then the code below it will run regardless of whether it is wrapped in an else statement or not. Does that sound write?

    Read the article

  • What scripts should not be ported from bash to python?

    - by Jack
    I decided to rewrite all our Bash scripts in Python (there are not so many of them) as my first Python project. The reason for it is that although being quite fluent in Bash I feel it's somewhat archaic language and since our system is in the first stages of its developments I think switching to Python now will be the right thing to do. Are there scripts that should always be written in Bash? For example, we have an init.d daemon script - is it OK to use Python for it? We run CentOS. Thanks.

    Read the article

  • jQuery plugin to style objects

    - by Alex
    Hi. I've been looking at the various JavaScript UI libraries and am wondering if there's one that can add some styling to page elements. I'm currently adding rounded corners, shadows, borders, and gradients via my own CSS + hacks to get it working on IE. I'm using jQuery for a number of tasks and wondered if there's a plugin that can add these design flairs more easily to DIVs. Not that you want to go overboard with this stuff, but when you need to use it, you'd like to depend on cross-browser and tried-and-tested solutions. Thanks.

    Read the article

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