Search Results

Search found 10355 results on 415 pages for 'shell extension'.

Page 29/415 | < Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >

  • Google Chrome Extension

    - by Jamie
    Is there a way to replace inside the DOM of a page using the replace() in javascript In the source code I want to replace: <div class="topbar">Bookmark Us</div> to <div class="topbar"><span class="larger-font">Bookmark Us</span></div> When a Google Chrome extenstion is on the matched website of a URL and it will do the above. Any page that matches: http://www.domain.com/support.php Thanks.

    Read the article

  • FTP to SFTP in shell scripting

    - by Kimi
    This script is to connect to different servers and copy a file from a loaction defined. It is mandatory to use sftp and not ftp. #!/usr/bin/ksh -xvf Detail="jyotibo|snv4915|/tlmusr1/tlm/rt/jyotibo/JyotiBo/ jyotibo|snv4915|/tlmusr1/tlm/rt/jyotibo/JyotiBo/" password=Unix11! c_filename=import.log localpath1=`pwd` for i in $Detail do echo $i UserName=`echo $i | cut -d'|' -f1` echo $UserName remotehost=`echo $i | cut -d'|' -f2` echo $remotehost remote_path=`echo $i | cut -d'|' -f3` echo $remote_path { echo "open $remotehost user $UserName $password lcd $localpath1 cd $remote_path bi prompt mget $c_filename prompt " } |ftp -i -n -v 2>&1 done I want to do the similar thing using sftp instead of ftp.

    Read the article

  • crone tab shell script do not save output

    - by Anas
    i use cron tab with command wget http://www.mydomain.com/page.php to run one of my pages in server. It works, but problem is output is sved with names page.php, page.php1, page.php2, page.php3 etc. Can i run the page using wget without sving output

    Read the article

  • Selecting Update queries alone from list of files using shell script

    - by Harish
    I am trying to get Update queries from a list of files using this script.I need to take lines containing "Update" alone and not "Updated" or "UpdateSQL"As we know all update queries contain set I am using that as well.But I need to remove cases like Updated and UpdatedSQL can anyone help? nawk -v file="$TEST" 'BEGIN{RS=";"} /[Uu][Pp][Dd][Aa][Tt][Ee] .*[sS][eE][tT]/{ gsub(/.*UPDATE/,"UPDATE");gsub(/.*Update/,"Update");gsub(/.*update/,"update");gsub(/\n+/,"");print file,"#",$0;} ' "$TEST" >> $OUT

    Read the article

  • Shell - Run additional command on failure

    - by Shawn
    I have this script that I am currently running that works great for all instances but one: #!/bin/sh pdfopt test.pdf test.opt.pdf &>/dev/null pdf2swf test.opt.pdf test.swf [ "$?" -ne 0 ] && exit 2 More lines to execute follow the above code ... How would I go about changing this script to run "pdf2swf test.pdf test.swf" if "pdf2swf test.opt.pdf test.swf" fails? If the second attempt fails, then I would "exit 2". Thanks

    Read the article

  • storing passed arguments in separate variables -shell scripting

    - by Nathan Pk
    In my script "script.sh" , I want to store 1st and 2nd argument to some variable and rest to another separate variable. What command I must use to implement this task? Number of arguments that is passed to a script is random) When I run the command in console ./script.sh abc def ghi jkl mn o p qrs xxx #It can have any number of arguments In this case, I want my script to store "abc" and "def" in one variable. "ghi jkl mn o p qrs xxx" should be stored in another variable.

    Read the article

  • Shell script task status monitoring

    - by Bikram Agarwal
    I'm running an ANT task in background and checking in 60 second intervals whether that task is complete or not. If it is not, every 60 seconds, a message should be displayed on screen - "Deploy process is still running. $slept seconds since deploy started", where $slept is 60, 120, 180 n so on. There's a limit of 1200 seconds, after which the script will show the log via 'ant log' command and ask the user whether to continue. If the user chooses to continue, 300 seconds are added to the time limit and the process repeats. The code that I am using for this task is - ant deploy & limit=1200 deploy_check() { while [ ${slept:-0} -le $limit ]; do sleep 60 && slept=`expr ${slept:-0} + 60` if [ $$ = "`ps -o ppid= -p $!`" ]; then echo "Deploy process is still running. $slept seconds since deploy started." else wait $! && echo "Application ${New_App_Name} deployed successfully" || echo "Deployment of ${New_App_Name} failed" break fi done } deploy_check if [ $$ = "`ps -o ppid= -p $!`" ]; then echo "Deploy process did not finish in $slept seconds. Here's the log." ant log echo "Do you want to kill the process? Press Ctrl+C to kill. Press Enter to continue." read log limit=`expr ${limit} + 300` deploy_check fi Now, the problem is - this code is not working. This looks like a perfectly good code and yet, this is not working. Can anyone point out what is wrong with this code, please.

    Read the article

  • Shell script to name videos on device

    - by Jordan
    I have a .sh script that automounts any usb device that is plugged in. I need it to also find if there are videos in a certain location on the device that is plugged in then write them to a videos.txt file. Here's what I have and its not working. Also I need it to put the mountpoint in the videos.txt file. ${MOUNTPOINT}$count is the path to the mounted device. VIDEOS=ls ${MOUNTPOINT}$count/dcim/100Video | grep mp4 if [ "$VIDEOS" -ne "" ] ; then "${MOUNTPOINT}$count" > ${MOUNTPOINT}$count/videos.txt; "$VIDEOS" >> ${MOUNTPOINT}$count/videos.txt; fi What am I doing wrong?

    Read the article

  • Linux: shell builtin string matching

    - by gmatt
    I am trying to become more familiar with using the builtin string matching stuff available in shells in linux. I came across this guys posting, and he showed an example a="abc|def" echo ${a#*|} # will yield "def" echo ${a%|*} # will yield "abc" I tried it out and it does what its advertised to do, but I don't understand what the $,{},#,*,| are doing, I tried looking for some reference online or in the manuals but I couldn't find anything. Can anyone explain to me what's going on here?

    Read the article

  • Get URL and save it | Chrome Extension

    - by Jamie
    Basically on my window (when you click the icon) it should open and show the URL of the tab and next to it I want it to say "Save", it will save it to the localStorage, and to be displayed below into the saved links area. Like this:

    Read the article

  • How to bundle extension methods requiring configuration in a library

    - by Greg
    Hi, I would like to develop a library that I can re-use to add various methods involved in navigating/searching through a graph (nodes/relationships, or if you like vertexs/edges). The generic requirements would be: There are existing classes in the main project that already implement the equivalent of the graph class (which contains the lists of nodes / relationships), node class and relationship class (which links nodes together) - the main project likely already has persistence mechanisms for the info (e.g. these classes might be built using Entity Framework for persistance) Methods would need to be added to each of these 3 classes: (a) graph class - methods like "search all nodes", (b) node class - methods such as "find all children to depth i", c) relationship class - methods like "return relationship type", "get parent node", "get child node". I assume there would be a need to inform the library with the extending methods the class names for the graph/node/relationships table (as different project might use different names). To some extent it would need to be like how a generics collection works (where you pass the classes to the collection so it knows what they are). Need to be a way to inform the library of which node property to use for equality checks perhaps (e.g. if it were a graph of webpages the equality field to use might be the URI path) I'm assuming that using abstract base classes wouldn't really work as this would tie usage down to have to use the same persistence approach, and same class names etc. Whereas really I want to be able to, for a project that has "graph-like" characteristics, the ability to add graph searching/walking methods to it.

    Read the article

  • Running shell scripts with sudo through my web app

    - by nfm
    I have some functionality that interfaces with the server's OS in my web application. I've written a bash script and am able to run it from within my app. However, some functionality of the script requires superuser privileges. What is the most sane way to run this script securely? It is being passed arguments from a web form, but should only be able to be called by authenticated users that I trust not to haxxor it.

    Read the article

  • An agenda in Korn Shell: New / Edit / Delete / View appointment

    - by Abaco
    As stated in the title, I have to write a simple script which should perform some typical agenda's functions. The script must use crontab. The functions are: Creating a new appointment Edit an existent appointment Delete an appointment List the appointment I really don't have a clue how to do this, can you help me with some hint? Maybe a bit of sweet code? Thank you very much, Abaco EDIT: To be more specific on my question Point 1: how can I edit a crontab thorugh ksh? How can I insert a new line? Can you link me some documentation or a bit of code about this?

    Read the article

  • How to: Simulating keystroke inputs in shell to an app running in an embedded target

    - by fzkl
    I am writing an automation script that runs on an embedded linux target. A part of the script involves running an app on the target and obtaining some data from the stdout. Stdout here is the ssh terminal connection I have to the target. However, this data is available on the stdout only if certain keys are pressed and the key press has to be done on the keyboard connected to the embedded target and not on the host system from which I have ssh'd into the target. Is there any way to simulate this? Edit: Elaborating on what I need - I have an OpenGL app that I run on the embedded linux (works like regular linux) target. This displays some graphics on the embedded system's display device. Pressing f on the keyboard connected to the target outputs the fps data onto the ssh terminal from which I control the target. Since I am automating the process of running this OpenGL app and obtaining the fps scores, I can't expect a keyboard to be connected to the target let alone expect a user to input a keystroke on the embedded target keyboard. How do I go about this? Thanks.

    Read the article

  • Chrome extension: sendMessage doesn't work

    - by user3334776
    I've already read the documentation from Google on 'message passing' a few times and have probably looked at over 10 other questions with the same problem and already tried quiet a few variations of most of their "solutions" and of what I have below... This is black magic, right? Either way, here it goes. Manifest File: { "manifest_version" : 2, "name" : "Message Test", "version" : "1.0", "browser_action": { "default_popup": "popup.html" }, "background": { "scripts": ["background.js"] }, "content_scripts": [ { "matches" : ["<all_urls>"], "js": ["message-test.js"] } ] } I'm aware extensions aren't suppose to use inline JS, but I'm leaving this in so the original question can be left as it was since I still can't get the message to send from the background page, When I switch from the popup to the background, I removed the appropriate lines from the manifest.json popup.html file: <html> <head> <script> chrome.tabs.query({active: true, currentWindow: true}, function(tabs) { chrome.tabs.sendMessage(tabs[0].id, {greeting: "hello", theMessage: "Why isn\'t this working?"}, function(response) { console.log(response.farewell); }); }); </script> </head> <body> </body> </html> OR background.js file: chrome.tabs.query({active: true, currentWindow: true}, function(tabs) { chrome.tabs.sendMessage(tabs[0].id, {greeting: "hello", theMessage: "Why isn\'t this working?"}, function(response) { console.log(response.farewell); }); }); message-test.js file: var Mymessage; chrome.runtime.onMessage.addListener(function(message, sender, sendResponse) { if (message.greeting == "hello"){ Mymessage = message.theMessage; alert(Mymessage); } else{ sendResponse({}); } }); No alert(Mymessage) goes off. I'm also trying to execute this after pressing a button from a popup and having a window at a specified url, but that's a later issue. The other files can be found here except with the background.js content wrapped in an addEventListener("click"....: http://pastebin.com/KhqxLx5y AND http://pastebin.com/JaGcp6tj

    Read the article

  • Substring extraction using bash shell scripting and awk

    - by rohanbk
    So, I have a file called 'dummy' which contains the string: "There is 100% packet loss at node 1". I also have a small script that I want to use to grab the percentage from this file. The script is below. result=`grep 'packet loss' dummy` | awk '{ first=match($0,"[0-9]+%") last=match($0," packet loss") s=substr($0,first,last-first) print s}' echo $result I want the value of $result to basically be 100% in this case. But for some reason, it just prints out a blank string. Can anyone help me?

    Read the article

  • Telnet SMTP with expect or shell script

    - by Fendrix
    Want to build up a Auth Smtp Connection with expect script... just to test I wanted to get ehlo parameters but expect is not working like this #!/usr/bin/expect set timeout -1 set smtp [lindex $argv 0] set port [lindex $argv 1] spawn telnet $smtp $port expect "[2]{2,}[0]{1,}" send "ehlo" I expect the code 220 to come from mailserver to continue to send ehlo ... just like ..../...:telnet smtp.mail.yahoo.de 25 Trying 77.238.184.85... Connected to smtp2-de.mail.vip.ukl.yahoo.com. Escape character is '^]'. 220 smtp116.mail.ukl.yahoo.com ESMTP ehlo 250-smtp116.mail.ukl.yahoo.com 250-AUTH LOGIN PLAIN XYMCOOKIE 250-PIPELINING 250-SIZE 41697280 250 8BITMIME

    Read the article

  • shell scripting: nested subshell ++

    - by jhon
    Hi guys, more than a problem, this is a request for "another way to do this" actually, if a want to use the result from a previous command I into another one, I use: R1=$("cat somefile | awk '{ print $1 }'" ) myScript -c $R1 -h123 then, a "better way"is: myScript -c $("cat somefile | awk '{ print $1 }'" ) -h123 but, what if I have to use several times the result, let's say: using several times $R1, well the 2 options: option 1 R1=$("cat somefile | awk '{ print $1}'") myScript -c $R1 -h123 -x$R1 option 2 myScript -c $("cat somefile | awk '{ print $1 }'" ) -h123 -x $("cat somefile | awk '{ print $1 }'" ) do you know another way to "store" the result of a previous command/script and use it as a argument into another command/script? thanks

    Read the article

  • Korn Shell SegFault

    - by C. Ross
    I have found the following script causes a segmentation fault and core in kshell on AIX. Can anyone explain why I get the following results? Seg Fault doOutput(){ Echo "Something" } doOutput() >&1 OR doOutput(){ Echo "Something" } echo `doOutput()` No Output doOutput(){ Echo "Something" } doOutput() Correct doOutput(){ Echo "Something" } doOutput OR doOutput(){ Echo "Something" } doOutput >&1

    Read the article

  • Function behaviour on shell(ksh) script

    - by footy
    Here are 2 different versions of a program: this Program: #!/usr/bin/ksh printmsg() { i=1 print "hello function :)"; } i=0; echo I printed `printmsg`; printmsg echo $i Output: # ksh e I printed hello function :) hello function :) 1 and Program: #!/usr/bin/ksh printmsg() { i=1 print "hello function :)"; } i=0; echo I printed `printmsg`; echo $i Output: # ksh e I printed hello function :) 0 The only difference between the above 2 programs is that printmsg is 2times in the above program while printmsg is called once in the below program. My Doubt arises here: To quote Be warned: Functions act almost just like external scripts... except that by default, all variables are SHARED between the same ksh process! If you change a variable name inside a function.... that variable's value will still be changed after you have left the function!! But we can clearly see in the 2nd program's output that the value of i remains unchanged. But we are sure that the function is called as the print statement gets the the output of the function and prints it. So why is the output different in both?

    Read the article

< Previous Page | 25 26 27 28 29 30 31 32 33 34 35 36  | Next Page >