I have wriiten a script to switch on buzzer and given the path of that script in '/etc/rc.local'. So after booting my script works and it make the buzzer to switch on... my question is i want to switch the buzzer off when my device is shutdown.(for startup we use rc.local file is there any file to edit and use while shutdown.)

Member Avatar
+0 forum 0

I am very new to powershell and I am attempting to import multiple csv files into a SQL database. I have it working if I specify the file but I want to have it import multiple files from a specific folder. The way it's working right now, it will import the one specified file multiple times, based on how many files are in the folder. I've done some digging around and I believe I need to do something like Set objFSO = CreateObject("Scripting.FileSystemObject") objStartFolder = "C:\Files" Set objFolder = objFSO.GetFolder(objStartFolder) Set Files = objFolder.Files For each objfile in Files and …

Member Avatar
+0 forum 0

Hi, Below is the code i am using. On console output is fine but when i am redirecting output to file then single line is breaking in multiple lines. Please help. for dir in */; do printf "%s, " "$dir"; ls -m "$dir"; done **Output on Consloe : ** buckets/, apr_bucasdfsadfa_fasdfasfaool.lo, apr_buckets_simpleapr_buckets_simple.lo, apr_buckets_socketapr_buckets.lo, apr_buowekrfwqereqjncckets_reqwer.lo build/, config_vars.sh.in, export_varsexport_varsexport_vars.pl, mkdepphf_abuse_logphf_abuse_logp.perl, rules.mksocketapr_buckets.insocketapr_buckets include/, util_md5util_md5util.h, util_scriptutil_scriptutit.h, util_timeutil_hutil_time.h, util_xmlutil_xml.h os/, ap_regkeyap_regkey.c, MakefileMakefile.in, MakefileMakefileMake, osabuse_logabuse_log.h server/, export_filesexport_files, export_vars.hexport_vars.h, httpd.exphttpd.exp, libmain.lalibmain.la support/, logresolve.pllogresolve, log_server_statuslog_server_status, phf_abuse_phf_abuse_log.cgi, split-logfilesplit-log cat output.txt **Output in file** buckets/, apr_bucasdfsadfa_fasdfasfaool.lo, apr_buckets_simpleapr_buckets_simple.lo, apr_buckets_socketapr_buckets.lo, apr_buowekrfwqereqjncckets_reqwer.lo build/, config_vars.sh.in, export_varsexport_varsexport_vars.pl, mkdepphf_abuse_logphf_abuse_logp.perl, rules.mksocketapr_buckets.insocketapr_buckets include/, util_md5util_md5util.h, util_scriptutil_scriptutit.h, util_timeutil_hutil_time.h, util_xmlutil_xml.h os/, …

Member Avatar
+0 forum 0

Writing a PSUnit test case where I need to get a specific value from a single row in the data table that was generated from my separate powershell function. To do this I figured I could use a foreach loop, but I am not sure how to write the inner code to grab the row value from the second column in the data table. I gave it a try but my $actual variable is coming back with a null value .. And lastly, I have an assert statment where I am comparing $actual -> $expected $dt = Get-TableRowCOunts -ServerName $serverName …

Member Avatar
+0 forum 0

Hi....below is my .csh file. In this foreach n, i have runned my algorithm 10 times. But now i want it to run(iterate) 1000 times. i.e. foreach seed(1 2 3 4 5 6 7 8 9 10 11 12......1000). I tried using awk'BEGIN{for(....);}'.But still its not working...please help. foreach n( 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20) rm no_yes${no_yes} end rm iteration printf "No. of SU iterations\n ">> iteration foreach n( 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 …

Member Avatar
+0 forum 0

write a Bash script file that implement the RSA algorithm. The user has to enter on the command line some parameters and options, which will determine the behaviors of the script. The syntax of the shell command is $ your-shell-file-name –p<file> –q<file> –e|-d [-i <filename>] [-o <filename>] OR $ your-shell-file-name –h Which displays a help message indicating the usage of the command (syntax) and the meaning of options. Following are the options that need to be supported in your script:  -p<file> : filename which contains the first prime number, p. It should be at least 5 digits  -q<file>: …

Member Avatar
+0 forum 0

Hi all, Excuse me if i am posting this question in a wrong forum. I have YTD video downloader in my pc. But it doesn't have a download complete message box. Instead, it will display the download status in it's own listview. But if YTD is minimized, then we never know that download is completed. So i wrote an AutoIt script for checking the download status and alert me when it is finished. Now i need to run this script automatically when i clicked in YTD's "DOWNLOAD" button. Some says that i need to use SetWindowsHookEx. If so, AutoIt has …

Member Avatar
+0 forum 0

Is it possible to run to run photorec such a way not to recover all photos on a drive just those with specific EXIF data? If photorec cannot solve this request itself, is it possible to do this with a script which can filter the results online?

Member Avatar
+0 forum 0

i have created my plsql script but i need to run it with shell script but i can get to it please help

Member Avatar
+0 forum 0

Is it possible to make a bot that would be able to go to a website and vote for said website multipule times?

Member Avatar
+0 forum 0

How can I use seleium test case in groovy? such as clinking on links. test case <html> ... <body> <table> <tr> <td>open</td> <td>https://url.web:8010/</td> </tr> <tr> <td>clickAndWait</td> <td>link=service=homeLink</td> </tr> <tr> <td>clickAndWait</td> <td>link=name=contentLink,service=Queue</td> </tr> <tr> <td>clickAndWait</td> <td>link=BackLink</td> </tr> ... groovy script // Setup credentials def String[] credentials = new String[2] credentials[0] = "username" credentials[1] = "password" def jmxEnv = [(JMXConnector.CREDENTIALS):credentials] // Setup JMX connection with credentials def serverUrl = 'service:jmx:rmi:///jndi/rmi://url.web:8010/jmxrmi' def server = JmxFactory.connect(new JmxUrl(serverUrl), jmxEnv).MBeanServerConnection

Member Avatar
+0 forum 0

What I would like to do is read each line in the atdinfile: A sample atdinfile would look like this: 651 652 653 654 655 656 657 658 659 660 661 664 665 666 667 668 I would like to grep through each atd job id looking for a match based on the input from another infile would is a listed of user groups: A sample grplist file would look like this; groupa groupb groupc groupd groupe The code below will go through the list of atd jobs only once and try to match a corresponding line in the group …

Member Avatar
+0 forum 0

Team, Can any one assist me with my below script requirements I log into a jump box with my login and password, Here I need to create a script which i will run from this point that will connect to a different server using ssh and it should prompt me with the password for which i will key in the RSA token details, and once logged in, I do a sudo su - <username>, again i will fetch the password from my RSA token.after which i need to end the script with the pwd and ls -l command. Can any …

Member Avatar
+0 forum 0

How to validate multiple inputs on a dialog form using shell scripting? Validations must be performed before submitting form or when focus shift to any other input field .

Member Avatar
+0 forum 0

I am having this simple script: #!/usr/bin/expect -f set values "#host=CE101 #host=CE102" set found [regexp {[A-Z]{1,2}\d{2,3}} $values CE CE1] if {$found == 1} { puts "px is $CE" puts "vpx is $CE1" } else { puts "\nfailed to match anything from\r\n$values" } puts $found So my problem is that regexp is passing only the first found result to a variable and the second one is not being passed. I am sure that is the problem because of adding -all to regexp is returning 2 so I am sure that its matching both values, but I don't know why it's passing …

Member Avatar
+0 forum 0

Hello all, I am by no means a coder, so hopefully someone has something they would be willing to share that would meet this need. I would like to have a Outlook rule, where: - When an email comes in from a specific account - Has an attachment (PDF, doc, docx, tff only) - Saves the attachment to a folder (say on desktop) I would like this done to maybe 3-5 different email accounts, and bonus points if it could then delete the email completely after. I would be using outlook 2010. Any one have something that would work?

Member Avatar
+0 forum 0

Hi Friends. I am trying to conver the following grep syntax to replace using awk pattern match. Can you please help? tail -F $logFiles | grep " ERROR " | grep -v 'ERROR_SERVER \|Session is null for endpointId\|SYNCED_IN_VIEW_UPDATED'| cut -d" " -f10-14 | awk 'BEGIN..............}' I am seeing some buffering problems with tail -F piped to grep. So, would like to avoid grep.. Can someone help me how i can use pattern match instead of "grep " ERROR " | grep -v 'ERROR_SERVER \|Session is null for endpointId\|SYNCED_IN_VIEW_UPDATED'| cut -d" " -f10-14"? Thanks Srini

Member Avatar
+0 forum 0

Hi, I need to monitor the ip addresses in a server. whenever there is a fluctuation, i need to do some clean up (like restart the server/ reboot the machine) I was able to get a sample cpp program & was able to enhance it to suit my needs. But i think it would be better if i am able to convert it into a shell script as it will give me more flexibility in parsing the output. any body has got any idea of the syntax to be used for netlink sockets in shell script, since I could not …

Member Avatar
+0 forum 0

Month CBS GFS HR HR Payroll INCV cbs1 gfs1 hr1 hr2 hrm incv1 Baseline <=97 <=125 >=11 >=19 <=25 10 (6mths) 2013-07 97 89 14 28 30 4 2013-08 58 103 18 6 24 18 2013-09 54 110 11 14 25 17 2013-10 108 129 17 8 23 18 2013-11 52 137 12 8 21 30 2013-12 18 84 6 0 13 13 2014-01 8 6 1 0 9 3 #How to create a standard deviation based on the baseline for the 6 months AND after calculating the standard deviation, it will do a flag and prompt/inform the user that …

Member Avatar
+0 forum 0

Hello, Currently I am trying to make Windows Hyper-V and Virtual-Box coexist in the same machine, normally only one hypervisor should be running at any given time but Hyper-V runs all the time. I did some Googling and found this solution (http://derekgusoff.wordpress.com/2012/09/05/run-hyper-v-and-virtualbox-on-the-same-machine/). It works just fine, however I would like to automate the process of toggling the hypervisorlaunchtype from off to auto automalically through a batch script. Here is some sudo-code of what I would like to do: if (hypervisorlaunchtype == auto){ bcdedit /set hypervisorlaunchtype off } else { bcdedit /set hypervisorlaunchtype auto } I have done some Googling on …

Member Avatar
+0 forum 0

iam doing a python program and the question reads:Write a program that asks the user about textbook prices and reports how overpriced the textbooks are. (You may wish to read this number from the user with the input command. You can round numbers with the round command.) You should match the following output How much do you want to pay for each textbook?50 How much did the average textbook actually cost?80 How many books did you buy?5 Each book is overpriced by $30 ( 60% ) You got ripped off by $150 total You may assume that the user enters …

Member Avatar
+0 forum 0

I'm currently pulling out information from column B in an Excel worksheet + the worksheet name. How would I go about pulling information from column J (which has the same start row/end row as the information pulled out from column B) in the same worksheet and assigning it to the object property $apps.location? I've done a bit of research on the internet, but there doesn't seem to be a straightforward method of accomplishing this. $(for ($i=3; $i -le $wb.sheets.count; $i++){ $sh=$wb.Sheets.Item($i) $startCell_appname = $sh.cells.item(1,2).EntireColumn.find("Application Name").Address() $startCell_appname = [regex]::replace($startCell_appname, '(\$\w+\$)(\d+)', {param($m) $m.groups[1].value + ([int]$m.groups[2].value+1)}) $endCell_appname = $sh.cells.item(1,2).EntireColumn.find("").Address() $endCell_appname = [regex]::replace($endCell_appname, '(\$\w+\$)(\d+)', …

Member Avatar
+0 forum 0

Hi, The below link provides a solution to access snipping tool using shell script, but the same is not working against windows-8 http://www.mrexcel.com/forum/excel-questions/497620-shell-snipping-tool-returns-run-time-error-53-file-not-found.html Please suggest us to use snipping tool against shell scripting in Windows-8

Member Avatar
+0 forum 0

I was wondering how could I solve this problem, I have a php project in which I have tables, but I didn't use `<thead>` and `<tbody>`, but now I am using DataTable jquery plugin, and it needs that the tables have them, so I need to modify all of my files, so I tried to do it with gsed but it doesn't seem to recognize the pattern because I have spaces and newlines between the elements I specify in my regular expression. For example <table id="tableId" cellpadding="0" cellspacing="0" border="0" class="display" width="100%"> <tr> <th>#</th> <th>Nombre</th> ... </tr> So my plan is …

Member Avatar
+0 forum 0

Good Morning, I'm new to Powershell and i'm attempting to create a script which will copy a folder to a spesific directory on an FTP site. I did some Googling and all I seem to come up with are ways to copy the folder contents, but not the folder itself. Is there a easy to copy an entire folder to an FTP site using Powershell?

Member Avatar
+0 forum 0

Today I have finally made up my mind to quit bat scripting and go for powershell... I need to do a quick script bascially trying to looping through a command output.. can anyone shed some light? i tried foreach ($col in 'app-command -argument') { echo $col } well, guess my guess isn't correct. Can anyone help me with this? Thanks thanks

Member Avatar
+0 forum 0

I have to run some shell scripts in Windows using Cygwin. I am able to achieve that using %BASH% --login -i "/cygdrive/d/script.sh", where %BASH% is an environment variable in Windows set to C:\cygwin\bin\bash.exe. I have a created a Cygwin environment variable $EXE_PATH = /cygdrive/d/somepath/dir. Inside my script the line is $EXE_PATH/some.exe -f /cygdrive/d/password.txtThere is error in this line every time I run the script. Error is something to do with the some.exe/password.txt not being found. If I run the same command from the Cygwin terminal, it works fine. Is there something wrong with the environemnt variable or the way exe …

Member Avatar
+0 forum 0

Below is a program I'M trying to write that will take an 8 digit date and validate whether or not it's a valid date. I'M very new to shell scripting so I really a have no idea what I'M going. Could you take a look and let me know what all I'M doing wrong here? Thanks. #! /bin/bash -x # This is the calender array for the DateValidation program CALENDER=(31 28 31 30 31 30 31 31 30 31 30 31) read -p "Enter a date for validation: " DATE # establish the varible LEN to hold the number of …

Member Avatar
+0 forum 0

Hi,I am using following code for FTP in shell script file and it is working.Now I want to migrate from FTP to SFTP.What code changes/steps I have to perform for SFTP ? ftp -in <<FIN open $SAP_UP_SERVER user $SAP_UP_USER $SAP_UP_PASSWORD asc put $PM00_OUTPUTS_DIRECTORY/$SAP_UP_FILE_CSV /$SAP_UP_FILE_CSV put $PM00_OUTPUTS_DIRECTORY/$SAP_UP_FILE_CTL /$SAP_UP_FILE_CTL prompt ... End File ftp dates transaction QUIT FIN My shell scripts are executing on Unix server and transfering files to window server 2008.There is one scheduled job (via Control-M) on server that is executing shellscript everyday. so how to setup ssh password less login to avoid using hard-coded passwords ? Can you …

Member Avatar
+0 forum 0

OK so I am basically brand new to shell scripts and new to Unix in general. I have a server that has two profiles, one is a shared account for a few friends and I and the other is one that I use to run video game servers off of. I would like a script that would automatically run our remote viewing program on both accounts and then run a game server program on just the second account when the computer starts. I have absolutely no idea how this would be done and don't even know where to start looking …

Member Avatar
+0 forum 0

The End.