Search Results

Search found 4958 results on 199 pages for 'shell'.

Page 12/199 | < Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >

  • shell tool which renders web site including javascript

    - by drholzmichl
    Hi, we want to test our webpages on linux shell. For that reason I'm looking for a shell tool, which gets the html page from server (like 'wget') and then executes contained Javascript, include pictures and so on. After this, the tool should give me a 'screenshot' of the rendered page, so that I can create a checksum for that screen. (So I want to the same as opening browser in Windows, open webpage and make a screenshot after page load, but on linux) Can anyone give me a hint?

    Read the article

  • python script argument misinterpreted in Hudson Execute Shell step

    - by chz
    When I run my python script in the shell terminal, it works sudo myscript.py --version=22 --base=252 --hosts="{'hostA':[1],'hostB':[22]}" But when I run in Hudson and Jenkins, using Execute Shell step, somehow, the string --hosts="{'hostA':[1],'hostB':[22]}" is interpreted as sudo myscript.py --version=22 --base=252 '--hosts="{'hostA':[1],'hostB':[22]}"' How do we overcome this so that our script would run in Jenkins and Hudson ? Thank you. Sincerely

    Read the article

  • No gnome shell after install on ubuntu 12.04 inside VMWare workstation

    - by Wouter
    I created a virtual machine for ubuntu 12.04. I then installed GNOME3 from the software center, How do I install and use the latest version of GNOME Shell?. However after install I don't get the new gnome shell, in the terminal gnome-shell --version tells me that I'm using the latest version, 3.4.1. My interface now looks like this: Does anybody have an idea why I do not get the latest gnome shell? @Histo yes but why I don't have this interface?

    Read the article

  • How do I disable the calendar events section in GNOME Shell's clock applet?

    - by Victor
    I'm running gnome-shell 3.2.0 and when I click the clock applet in the middle of the top panel, the following shows up: I have no need for the entire right part, right of the dotted line, which is dedicated to the "Online Accounts" integration with evolution's calendar. Is there a way to remove/disable it, so I can just have the date part of the calendar applet (left of the dotted vertical line)? I just like to browse the dates to see how many days are left in the month and stuff like that. I use Google's web interface for my "Calendaring".

    Read the article

  • Shell script to emulate warnings-as-errors?

    - by talkaboutquality
    Some compilers let you set warnings as errors, so that you'll never leave any compiler warnings behind, because if you do, the code won't build. This is a Good Thing. Unfortunately, some compilers don't have a flag for warnings-as-errors. I need to write a shell script or wrapper that provides the feature. Presumably it parses the compilation console output and returns failure if there were any compiler warnings (or errors), and success otherwise. "Failure" also means (I think) that object code should not be produced. What's the shortest, simplest UNIX/Linux shell script you can write that meets the explicit requirements above, as well as the following implicit requirements of otherwise behaving just like the compiler: - accepts all flags, options, arguments - supports redirection of stdout and stderr - produces object code and links as directed Key words: elegant, meets all requirements. Extra credit: easy to incorporate into a GNU make file. Thanks for your help. === Clues === This solution to a different problem, using shell functions (?), Append text to stderr redirects in bash, might figure in. Wonder how to invite litb's friend "who knows bash quite well" to address my question? === Answer status === Thanks to Charlie Martin for the short answer, but that, unfortunately, is what I started out with. A while back I used that, released it for office use, and, within a few hours, had its most severe drawback pointed out to me: it will PASS a compilation with no warnings, but only errors. That's really bad because then we're delivering object code that the compiler is sure won't work. The simple solution also doesn't meet the other requirements listed. Thanks to Adam Rosenfield for the shorthand, and Chris Dodd for introducing pipefail to the solution. Chris' answer looks closest, because I think the pipefail should ensure that if compilation actually fails on error, that we'll get failure as we should. Chris, does pipefail work in all shells? And have any ideas on the rest of the implicit requirements listed above?

    Read the article

  • how to implement word count bash shell

    - by codemax
    hey guys. I am trying to write my own code for the word count in bash shell. I did usual way. But i wanna use pipe's output to count the word. So for eg the 1st command is cat and i am redirecting to a file called med. Now i have to use to 'dup2' function to count the words in that file. How can i write the code for my wc? This is the code for my shell pgm : void process( char* cmd[], int arg_count ) { pid_t pid; pid = fork(); char path[81]; getcwd(path,81); strcat(path,"/"); strcat(path,cmd[0]); if(pid < 0) { cout << "Fork Failed" << endl; exit(-1); } else if( pid == 0 ) { int fd; fd =open("med", O_RDONLY); dup2(fd ,0); execvp( path, cmd ); } else { wait(NULL); } } And my wordcount is : int main(int argc, char *argv[]) { char ch; int count = 0; ifstream infile(argv[1]); while(!infile.eof()) { infile.get(ch); if(ch == ' ') { count++; } } return 0; } I dont know how to do input redirection i want my code to do this : When i just type wordcount in my shell implementation, I want it to count the words in the med file by default. Thanks in advance

    Read the article

  • Trying to use a grails domain class from the shell

    - by ?????
    I'm new to Grails. I'm trying to experiement with my grails domains from the shell, and I can't get it to work. These domains work fine from the scaffold code when I run the app. Given this domain class class IncomingCall { String caller_id Date call_time int call_length static constraints = { } } I try to create an "IncomingCall" and save it from the shell. No matter what I do, I always get "Null"; the object isn't created. And if I try to create the object and then do a save, I get the "No hibernate session bound to thread" error (see below). groovy:000> new IncomingCall(caller_id:'555-1212', call_time: new Date(), call_length:10).save() ERROR org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here at org.springframework.orm.hibernate3.SpringSessionContext.currentSession (SpringSessionContext.java:63) at org.hibernate.impl.SessionFactoryImpl.getCurrentSession (SessionFactoryImpl.java:574) at groovysh_evaluate.run (groovysh_evaluate:3) ... groovy:000> How can I make this work from the shell?

    Read the article

  • wscript.shell running file with space in path with PHP

    - by ermac2014
    I was trying to use wscript.shell through COM objects with php to pass some cmd commands to cURL library (the DOS version). here is what I use to perform this task: function windExec($cmd,$mode=''){ // Setup the command to run from "run" $cmdline = "cmd /C $cmd"; // set-up the output and mode if ($mode=='FG'){ $outputfile = uniqid(time()) . ".txt"; $cmdline .= " > $outputfile"; $m = true; } else $m = false; // Make a new instance of the COM object $WshShell = new COM("WScript.Shell"); // Make the command window but dont show it. $oExec = $WshShell->Run($cmdline, 0, $m); if ($outputfile){ // Read the tmp file. $retStr = file_get_contents($outputfile); // Delete the temp_file. unlink($outputfile); } else $retStr = ""; return $retStr; } now when I run this function like: windExec("\"C:/Documents and Settings/ermac/Desktop/my project/curl\" http://www.google.com/", 'FG'); curl doesn't run because there is a problem with the path. but when I remove the spaces from the path it works great. windExec("\"C:/curl\" http://www.google.com/", 'FG'); so my question is how can I escape these spaces in wscript.shell commands? is there anyway I can fix this? thanks in advance :)

    Read the article

  • Extract history from Korn shell

    - by Luc
    I am not happy about the history file in binary format of the Korn shell. I like to "collect" some of my command lines, many of them actually, and for a long time. I'm talking about years. That doesn't seem easy in Korn because the history file is not plain text so I can't edit it, and a lot of junk is piling up in it. By "junk" I mean lines that I don'twant to keep, like 'cat' or 'man'. So I added these lines to my .profile: fc -ln 1 9999 ~/khistory.txt source ~/loghistory.sh ~/khistory.txt loghistory.sh contains a handful of sed and sort commands that gets rid of a lot of the junk. But apparently it is forbidden to run fc in the .profile file. I can't login whenever I do, the shell exits right away with signal 11. So I removed that 'fc -l' line from my .profile file and added it to the loghistory.sh script, but the shell still crashes. I also tried this line in my .profile: strings ~/.sh_history ~/khistory.txt source ~/loghistory.sh That doesn't crash, but the output is printed with an additional, random character in the beginning of many lines. I can run 'fc -l' on the command line, but that's no good. I need to automate that. But how? How can I extract my ksh history as plain text? TIA

    Read the article

  • Run FFmpeg from Shell Script

    - by Abs
    Hello all, I have found a useful shell script that shows all files in a directory recursively. Where it prints the file name echo "$i"; #Display File name. I would instead like to run an ffmpeg command on non MP3 files, how can I do this? I have very limited knowledge of shell scripts so I appreciate if I was spoon fed! :) //if file is NOT MP3 ffmpeg -i [the_file] -sameq [same_file_name_with_mp3_extension] //delete old file Here is the shell script for reference. DIR="." function list_files() { if !(test -d "$1") then echo $1; return; fi cd "$1" echo; echo `pwd`:; #Display Directory name for i in * do if test -d "$i" #if dictionary then list_files "$i" #recursively list files cd .. else echo "$i"; #Display File name fi done } if [ $# -eq 0 ] then list_files . exit 0 fi for i in $* do DIR="$1" list_files "$DIR" shift 1 #To read next directory/file name done

    Read the article

  • Error when opening .tar.gz via Shell to install Apache Maven

    - by adamsquared
    Thank you in advance for the help. My Goal: To install apache maven per its websites instructions (http://maven.apache.org/download.html), in order to install the JUNG package according to its install instructions (http://sourceforge.net/apps/trac/jung/wiki/JUNGManual), so I can use the JUNG classes in various Java GUIs. The Problem: I get an error message when I try to extract the apache-maven .gz (install?) file in shell. Background: I'm trying to install the JUNG (http://jung.sourceforge.net/index.html) package to my system's Java, so I can write object-oriented code using various GUIs (Ecliplse, Dr. Java) using the classes in JUNG. I don't understand how the building/installing process works, and how I can get what I build/install to work on various GUIs and the command line. I'm new to shell and the command line, and mostly have experience using a simple IDE (DrJava, Python IDLE, R GUI) to write and compile object-oriented code. Machine: Mac OSX 10.5.8 32-bit. The Instructions: For the maven building Extract the distribution archive, i.e. apache-maven-3.0.4-bin.tar.gz to the directory you wish to install Maven 3.0.4. These instructions assume you chose /usr/local/apache-maven. The subdirectory apache-maven-3.0.4 will be created from the archive. ... for the JUNG installation Appendix: How to Build JUNG This is a brief intro to building JUNG jars with maven2 (the build system that JUNG currently uses). First, ensure that you have a JDK of at least version 1.5: JUNG 2.0+ requires Java 1.5+. Ensure that your JAVA_HOME variable is set to the location of the JDK. On a Windows platform, you may have a separate JRE (Java Runtime Environment) and JDK (Java Development Kit). The JRE has no capability to compile Java source files, so you must have a JDK installed. If your JAVA_HOME variable is set to the location of the JRE, and not the location of the JDK, you will be unable to compile. Get Maven Download and install maven2 from maven.apache.org: http://maven.apache.org/download.html At time of writing (early December 2009), the latest version was maven-2.2.1. Install the downloaded maven2 (there are installation instructions on the Maven website). Follow the installation instructions and confirm a successful installation by typing 'mvn --version' in a command terminal window. Get JUNG ... What I Did: I downloaded the file apache-maven-2.2.1-bin.tar.gz. The JUNG website specified to use apache maven 2. I wanted to stick to the recommended installation instructions, but I couldn't get to /usr on my GUI (i've noticed you click on the MacHD symbol on the desktop its missing several directories/folders that you can see using the shell using the ls command at root directory I couldn't find a way to access the file using my mac GUI. Therefore, I used the shell to navigate to the root directory and then to /usr/local, and used the mkdir command to make the directory apache-maven and entered it. I then moved the file using the mv command. Next I tried extracting the file using tar -zxvf apache-maven-2.2.1-bin.tar.gz. The Error Message: tar: apache-maven-2.2.1/direcoryandfile: Cannot open: No such file or directory ... apache-maven-2.2.1/lib/ext: Cannot mkdir: No such file or directory apache-maven-2.2.1/lib/ext/README.txt tar: apache-maven-2.2.1/lib/ext/README.txt: Cannot open: No such file or directory tar: Error exit delayed from previous errors From what I can tell the archive file is missing some directories or something. I tried deleting the file, redownloading the .tar.gz file from a different mirror and repeating the process. Same result. Thanks again for the help

    Read the article

  • Gnome 3 Shell extensions not working on Ubuntu 12.4 [closed]

    - by user63960
    Possible Duplicate: Gnome Shell Extension Empty I just upgraded to Ubuntu 12.4 running on a Win 7 box via VBox and switched the user interface to Gnome 3 but have a problem. In Advanced Settings (gnome tweak), the Shell Extensions window has no listings and the Theme window shows a "caution" triangle next to the Shell theme drop box. I have re-installed the default extensions using the Noobs Lab posted instructions: sudo apt-get install shell-extensions3.4 sudo apt-get install gnome-shell-extensions The commands appear to complete without error. Symptoms are: Gnome 2 visual appearance and no window borders or controls. To close a window, I have to click the window indicator in the sys tray and select the close menu item. Any ideas?

    Read the article

  • UNIX Shell-scripting: UDV

    - by Myx
    I am writing a simple unix shell script: #!/bin/bash # abort the script if a command fails set -e # abort the script if an unitialized shell variable is used set -u i = 0; while [$i -l 1] do src/meshpro input/martini.off video/noise/image$i.off -noise $i src/meshview video/noise/image$i.off -output_image video/noise/image$i.jpg -exit_immediately i='expr $i + 0.1' done When I try to run the script, I get the following error: line 14: i: command not found. I used a tutorial to apply to my code. Any suggestions on what I'm doing wrong?

    Read the article

  • Processing a tab delimited file with shell script processing

    - by Lilly Tooner
    Hello, normally I would use Python/Perl for this procedure but I find myself (for political reasons) having to pull this off using a bash shell. I have a large tab delimited file that contains six columns and the second column is integers. I need to shell script a solution that would verify that the file indeed is six columns and that the second column is indeed integers. I am assuming that I would need to use sed/awk here somewhere. Problem is that I'm not that familiar with sed/awk. Any advice would be appreciated. Many thanks! Lilly

    Read the article

  • iPhone Shell - is there any?

    - by alee
    While working on iphone security architecture, i came to know that i can run applications from other applications in iphone. referring to the following url http://iphonedevelopertips.com/cocoa/launching-other-apps-within-an-iphone-application.html for example, i can put a link in a website with following hyperlink skype:// will result skype to run and call at particular number. Now i have few concerns here. is there a shell running in background in iphone, so that it allows other application to run basic app commands. if the above statement is true then how can i enable or run commands directly into iphone shell? if above statements are false, then could you please explain how these commands are being executed? is this part of iPhone SDK? or this funcationality is iPhone OS

    Read the article

  • Change present working directory of a calling shell from a ruby script

    - by Erik Kastman
    I'm writing a simple ruby sandbox command-line utility to copy and unzip directories from a remote filesystem to a local scratch directory in order to unzip them and let users edit the files. I'm using Dir.mktmpdir as the default scratch directory, which gives a really ugly path (for example: /var/folders/zz/zzzivhrRnAmviuee+++1vE+++yo/-Tmp-/d20100311-70034-abz5zj) I'd like the last action of the copy-and-unzip script to cd the calling shell into the new scratch directory so people can access it easily, but I can't figure out how to change the PWD of the calling shell. One possibility is to have the utility print out the new path to stdout and then run the script as part of a subshell (i.e. cd $(sandbox my_dir) ), but I want to print out progress on the copy-and-unzipping since it can take up to 10 minutes, so this won't work. Should I just have it go to a pre-determined, easy-to-find scratch directory? Does anyone have a better suggestion? Thanks in advance for your help. -Erik

    Read the article

  • Get seconds since epoch in any POSIX compliant shell

    - by mattbh
    I'd like to know if there's a way to get the number of seconds since the UNIX epoch in any POSIX compliant shell, without resorting to non-POSIX languages like perl, or using non-POSIX extensions like GNU awk's strftime function. Here are some solutions I've already ruled out... date +%s // Doesn't work on Solaris I've seen some shell scripts suggested before, which parse the output of date then derive seconds from the formatted gregorian calendar date, but they don't seem to take details like leap seconds into account. GNU awk has the strftime function, but this isn't available in standard awk. I could write a small C program which calls the time function, but the binary would be specific to a particular architecture. Is there a cross platform way to do this using only POSIX compliant tools? I'm tempted to give up and accept a dependency on perl, which is at least widely deployed. perl -e 'print time' // Cheating (non-POSIX), but should work on most platforms

    Read the article

  • How to execute with /bin/false shell

    - by Amar
    I am trying to setup per-user fastcgi scripts that will run each on a different port and with a different user. Here is example of my script: #!/bin/bash BIND=127.0.0.1:9001 USER=user PHP_FCGI_CHILDREN=2 PHP_FCGI_MAX_REQUESTS=10000 etc... However, if I add user with /bin/false (which I want, since this is about to be something like shared hosting and I don't want users to have shell access), the script is run under 1001, 1002 'user' which, as my Google searches showed, might be a security hole. My question is: Is it possible to allow user(s) to execute shell scripts but disable them so they cannot log in via SSH?

    Read the article

  • How te execute with /bin/false shell

    - by Amar
    Hello I am trying to setup per-user fastcgi scripts that will run each on different port and with different user. Here is example of my script: #!/bin/bash BIND=127.0.0.1:9001 USER=user PHP_FCGI_CHILDREN=2 PHP_FCGI_MAX_REQUESTS=10000 etc... However, if I add user with /bin/false (which I want, since this is about to be something like shared hosting and I dont want users to have shell access), the script is run'd under 1001, 1002 'user' which, as I googled, might be security hole. My question is: Is it possible to allow user(s) execute shell scripts but disable them to log in via SSH ? Thank you

    Read the article

  • shell script redirect output

    - by Andy
    I have a shell script to monitor process due to preventing the process closed. If the process is closed, that script will restart it. BTW, when the system starts, the crontab will run the script automatically. How can I get the output of the process which started by the shell script? #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH while : do if [ -z "$(ps -ef | grep -v grep | grep 225.0.6.4)" ]; then date +"%m-%d-%y %T" >> /home/andy/log/stream.log echo "225.0.6.4 - 103 not worked and restart process" >> /home/andy/log/stream.log echo "225.0.6.4 - 103 not worked and restart process" /usr/bin/tzap -a 1 -c /home/andy/channels.conf -o - -r -p "D" | /home/andy/ffmpeg -f mpegts -i pipe:0 -c:v libx264 -preset medium -crf 23 -bufsize 3000K -minrate 1200k -maxrate 1200k -pix_fmt yuv420p -g 50 -s 1024x768 -acodec libmp3lame -b:a 128k -ac 2 -ar 44100 -f mpegts udp://225.0.6.4:50000 & fi sleep 1 done

    Read the article

  • Shell script query

    - by WENzER
    Hi, I am having database. for that i want to get the script of all Store procedure. I have used dba_source table for getting script of Store procedure. Now I want to write a shell script which will give me all the scripts of store procedure in the seperate files. The approach i have applied that first I have written a query which will give the name of all store procedures and I am storing these names in seperate file. Now I am running a loop for getting sript of store procedures by using the names stored in file. All this i am able to do seperatly but not in shell script since I am new to it Please help me Thanks

    Read the article

  • Run Exchange Management Shell cmdlets from Visual Basic/C#/.NET app

    - by nowarninglabel
    Goal: Provide a web service using Visual Basic or C# or .NET that interacts with the Exchange Management Shell, sending it commands to run cmdlets, and return the results as XML. (Note that we could use any lanaguage to write the service, but since it is a Windows Box and we have Visual Studio 2008, it seemed like easiest solution would be just use it to create a VB/.NET web service. Indeed, it was quite easy to do so, just point and click.) Problem: How to run an Exchange Management Shell cmdlet from the web service, e.g, Get-DistributionGroupMember "Live Presidents" Seems that we should be able to create a PowerShell script that runs the cmdlet, and be able to call that from the command line, and thus just call it from within the program. Does this sound correct? If so how would I go about this? Thanks. Answer can be language agnostic, but Visual Basic would probably be best since that is what I loaded the test web service up in.

    Read the article

< Previous Page | 8 9 10 11 12 13 14 15 16 17 18 19  | Next Page >