Search Results

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

Page 103/1027 | < Previous Page | 99 100 101 102 103 104 105 106 107 108 109 110  | Next Page >

  • Want procmail to run a custom python script, everytime a new mail shows up

    - by Maddy
    I have a pretty usual requirement with procmail but I am unable to get the results somehow. I have procmailrc file with this content: :0 * ^To.*@myhost | /usr/bin/python /work/scripts/privilege_emails_forward.py Wherein my custom python script(privilege_emails_forward.py) will be scanning through the email currently received and do some operations on the mail content. But I am unable to get the script getting executed at the first shot(let alone scanning through the mail content). Is this a correct way of invoking an external program(python) as soon as new mail arrives? And how does my python program(privilege_emails_forward.py) will receive the mail as input? I mean as sys.argv or stdin????

    Read the article

  • Reading into directory, unix shell script

    - by dubya
    I am trying to analyze the files/directories inside of a directory using a shell script, for example if the file is readable, if it is a file, if it is a directory, etc. My script is set up to take a directory as input. so I would type 'file.sh directoryname'. However, when I create a for loop to analyze the files, it analyzes the files in my current working directory rather than the specified directory name. This is my broken code: file=$1 set mypath = $file for file in $mypath * do if [ -d $file ] dirCount=`expr $dirCount + 1` fi done Why does this read the working directory instead of the specified directory? Any help is appreciated. Thanks

    Read the article

  • Extracting numeric value from output of a uder defined aggregate in netezza using bash script

    - by Ankit
    I am executing a shell script to execute my user defined aggregate which is taking inputs yavg=nzsql -c 'select avg(x) from Input1' which is giving output like this AVG ---------- 2.000000 (1 row) I want to pass only the numeric(double) value which is 2.0000(where xavg is expected) from this to S4(x,y,$xavg,$yavg) where x and y are the whole column from table Input1, xavg=nzsql -c 'select avg(y) from Input1' Below is my InputTable.txt which is a text file from which I am popluating my "Input1" table in the shell script. 1 2 3 2 1 2 3 2 1 nzsql -c 'create table Input1(x integer, y integer, v integer)' nzload -t Input1 -df InputTable.txt nzsql -c 'select * from Input1 yavg=`nzsql -c 'select avg(x) from Input1'` xavg=`nzsql -c 'select avg(y) from Input1' nzsql -c 'select S4(x,y,$xavg,$yavg) from test' Below is the output : xavg := AVG ---------- 2.000000 (1 row) yavg := AVG ---------- 1.666667 (1 row) and i am passing this value to S4(x,y,$xavg,$yavg) which is a User defined aggregate

    Read the article

  • Bash script function return value problem

    - by Eedoh
    Hi to all. Can anyone help me return the correct value from a bash script function? Here's my function that should return first (and only) line of the file passed as an argument: LOG_FILE_CREATION_TIME() { return_value=`awk 'NR==1' $1` return return_value } And here's my call of that function in the other script: LOG_FILE_CREATION_TIME "logfile" timestamp=$? echo "Timestamp = $timestamp" I always get some random values with this code. If, for example, there's a value of 62772031 in the "logfile", I get Timestamp = 255 as an output. For some other values in the file, I get other random values as a return value, never the correct one. Any ideas?

    Read the article

  • Is there a max recommended size on bundling js/css files due to chunking or packet loss?

    - by George Mauer
    So we all have heard that its good to bundle your javascript. Of course it is, but it seems to me that the story is too simple. See if my logic makes sense here. Obviously fewer HTTP requests is fewer round trips and hence better. However - and I don't know much about bare http - aren't http responses sent in chunks? And if a file is larger than one of those chunks doesn't it have to be downloaded as multiple (possibly synchronous?) round trips? As opposed to this, several requests for files just under the chunking size would arrive much quicker since modern web browsers download resources like javascripts in parallel. Even if chunking is not an issue, it seems like there would be some max recommended size just due to likelyhood of packet loss alone since a bundled file must wait till it is entirely downloaded to execute, versus the more lenient native rule that scripts must execute in order. Obviously there's also matters of browser caching and code volatility to consider but can someone confirm this or explain why I'm off base? Does anyone have any numbers to put to it?

    Read the article

  • Ant database rebuild script, avoiding interactive prompting

    - by fras85
    Hi Guys. I'm writing an ant script to rebuild our database i.e. dropping everything and rebuilding from scratch. The problem our DBA adds a Y/N prompt before executing the rest of the script, and therefore we can't call this from an automated build process. Does anyone have any suggestions to circumvent the Y/N prompt? Obviously we could create seperate scripts, one for the DBA's and one for the automated build - but this requires maintaning both. We're running on Windows so it's not as easy as using sed to strip out the prompt...but i'm thinking something along those lines. Not sure if that's clear enough but hope you can help. Cheers.

    Read the article

  • Perl CGI script to not wait for a subprocess to complete

    - by Tyug
    Is it possible to continue displaying a CGI script's HTML without waiting for a child process to complete, yet the child process should stay alive when the CGI script is complete. Here's what I have, -- Display HTML page # html page set up... so header/other stuff #the -c, -h are params are just params system("perl subprocess.pm -c params -h 1 &"); #actually print the html page setup ... For some weird reason, it waits for the subprocess to finish before it outputs the html page even though I included the asynchronous system call for linux. It doesn't render the page immediately. Is it possible to print the html page without waiting for the subprocess to finish?

    Read the article

  • what is the error in this script?

    - by coderex
    <html> <body> <script language="javascript"> document.getElementById('myfileId').onchange = function(e) { alert('change'); } </script> <form action="" > <input type="file" id="myfileId" name="myfile"> </form> </body> </html> How can I call the JavaScript function after a file selection.

    Read the article

  • Python script shows different pythonpath

    - by Bird Jaguar IV
    Attempting to run runsnake gives ImportError: No module named wx Opening an ipython or python session seems to work fine: >>> import wx >>> import sys >>> print [p for p in sys.path if 'wx' in p] ['/usr/local/lib/wxPython-2.9.4.0/lib/python2.7/site-packages', '/usr/local/lib/wxPython-2.9.4.0/lib/python2.7/site-packages/wx-2.9.4-osx_cocoa', '/usr/local/lib/wxPython-2.9.4.0/lib/python2.7/site-packages/wx-2.9.1-osx_cocoa/tools'] as does putting that code in a script and calling python script.py. But putting that code at the beginning of runsnake.py prints an empty list (printing the whole sys.path prints a path quite different from my $PYTHONPATH). Why would it be different, and how to I get it to recognize wxPython?

    Read the article

  • How to edit doxygen.config from shell script?

    - by Sayan Ghosh
    Hi, I tried using Apple's shell script to automate doc set creation with every build (and loading that in XCode) - http://developer.apple.com/tools/creatingdocsetswithdoxygen.html but found that it had some bugs. Firstly it's not updating the entries in doxygen.config, perhaps one needs to put the settings in the exact hierarchy as it appears in the native doxygen file (?). My intention is to specify the settings in the following fashion in the shell script, and have a suitable config file generated tailored to my needs. ... echo "DOCSET_FEEDNAME = Some app" $TEMP_DIR/doxygen.config echo "GENERATE_LATEX = NO" $TEMP_DIR/doxygen.config echo "RECURSIVE = YES" $TEMP_DIR/doxygen.config ... Thank you, Sayan

    Read the article

  • VMWare Tools StartUp Script

    - by Horst Walter
    I am on the latest version of VMWare Workstation. In my VMWareTools I have configrued an individual script file (start.bat) to be started when the (guest) OS is booted. Unfortuantely it does not run when starting the guest system as intended. When pressing "run now" it works Running the script from CMD works as well I have changed the service (VMWareTools service) to run under different users - no success All Users (of the service) have had Administrator privileges I have no idea what is going wrong. Maybe someone is having an idea ....

    Read the article

  • Javascript alert instead of redirect in PHP mail script

    - by JCHASE11
    Thanks to Col. Shrapnel I am using a VERY basic PHP script to send emails. The form is located here. This is the script: <?php mail('[email protected]','Live Date Submission',implode("\n\n",$_POST)); header("Location: thankyou.html"); ?> When a user submits the form, they are redirected to a thankyou.html page. I want to edit the code to display a javascript alert, instead of a redirect. I don't have much PHP knowledge, so how would I edit this code to return a alert instead of a redirect?

    Read the article

  • stting environment variables in powershell by calling python script that prints $env:myVar=myvalue

    - by leeg
    I have some legacy python scripts that manage my shell environment for all the programs and plugins I am running on Linux (bash) and windows (cmd.exe). I want to port this to powershell. How do I set environment variables in powershell by calling python script that prints $env:myVar=myvalue and causes my environment variable to persist in the powershell. In Bash I can use a bash function to call my python script which prints export var=value to stdout and the function will set the environment variables in my shell. This will also work in windows cmd shell by calling a .bat file. I cannot figure out how to do this in powershell. I think it should be something like this: setvar.ps1: function SETVAR {c:\python26\python.exe varconfig.py } varconfig.py: import sys print >> sys.stdout, '$env:myVar=foo'

    Read the article

  • Script.PostDeployment.sql not executing in CI build VS 2010

    - by Suirtimed
    I have a database project in VS 2010 (SQL 2008). The local Deploy Solution action works and executes all of the SQL in the Script.PostDeployment.sql file. When I check changes in, the Build Definition for the continuous integration server executes. The database is deployed into the CI environment, but the PostDeployment script doesn't get executed. I wasn't able to find anything specific to this particular scenario. I also expect I'll need to provide additional information unless this is a trivial problem that I missed somewhere. Additional Information: The build is executing vsdbcmd.exe to deploy. The deployment manifest references the PostDeployment.sql file and it's present in the path with the rest of the files. Here is a reference to a thread on social.msdn.microsoft.com regarding this problem.

    Read the article

  • Python - Subprocess Popen and Thread error

    - by n0idea
    In both functions record and ftp, i have subprocess.Popen if __name__ == '__main__': try: t1 = threading.Thread(target = record) t1.daemon = True t1.start() t2 = threading.Thread(target = ftp) t2.daemon = True t2.start() except (KeyboardInterrupt, SystemExit): sys.exit() The error I'm receiving is: Exception in thread Thread-1 (most likely raised during interpreter shutdown): Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 551, in __bootstrap_inner File "/usr/lib/python2.7/threading.py", line 504, in run File "./in.py", line 20, in recordaudio File "/usr/lib/python2.7/subprocess.py", line 493, in call File "/usr/lib/python2.7/subprocess.py", line 679, in __init__ File "/usr/lib/python2.7/subprocess.py", line 1237, in _execute_child <type 'exceptions.AttributeError'>: 'NoneType' object has no attribute 'close' What might the issue be ?

    Read the article

  • Modifying the Google Drive menu interface

    - by Dangerbunny
    So I'm working on a web-app for the Google Marketplace that's going to involve integration with Google Drive. Part of what I want to be able to do with the app involves something along the lines of adding a menu option to the Drive menu interface. For instance, you could be editing a document in drive and browse to File-"My new fancy option." Does anyone know if this is possible? Or if it is not, is there another way of adding this sort of custom action functionality where you are able to perform non Drive standard actions on files from within the Drive interface?

    Read the article

  • Webmail Contact List Importer

    - by Andy Jarrett
    Does anyone know of a Webmail Contact List Importer scripts (ColdFusion, PHP etc) like those used on Twitter and LinkedIn ? I've found some but they are paid for and I want some more bespoke & open. To clarify a little more I'm not looking for a way to process .csv files :) I'm looking for a bit of code that can logging into gmail, yahoo mail, hotmail, aol and pull out the users address book.

    Read the article

  • Automatic Email Sender

    - by TheGBSoftware
    Hey All, I know that this is not the right forum to ask this question but I thought I would ask here first... I need to make a button where when you click it you are asked to provide your email and then click a "send" button... When you do it sends a default email to the email provided... And I would like to use this on my web-site so if it could be in HTML... ANY HELP IS APPRECIATED, THANKS -Gibson of GBSoftware and Island Games Limited-

    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

< Previous Page | 99 100 101 102 103 104 105 106 107 108 109 110  | Next Page >