Search Results

Search found 6758 results on 271 pages for 'shell exec'.

Page 33/271 | < Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >

  • how to send text to a process in a shell script?

    - by Martin
    So I have a Linux program that runs in a while(true) loop, which waits for user input, process it and print result to stdout. I want to write a shell script that open this program, feed it lines from a txt file, one line at a time and save the program output for each line to a file. So I want to know if there is any command for: - open a program - send text to a process - receive output from that program Many thanks.

    Read the article

  • Reliable alert dialogs from the shell

    - by intuited
    I'd like to have a message pop up in response to various system events, mostly in order to be able to set reminders for myself from a shell session. There are a few ways to do this; zenity seems to be the most polished. However, I've found at least two problems with zenity: Messages do not appear on all workspaces. I tried using the gtk option --screen to control this, but they just appear on the current workspace regardless. So if I am switching workspaces as the message comes up, I will not see it. Messages do not appear above all other windows. Specifically, if I am using guake, a new zenity message will appear below the guake window and I won't be able to see it. I tried a few other apps a while back. Both gmessage and xmessage exhibited problem 1; gmessage also exhibited problem 2. I did find that kalarm, which can be scripted from the command line, worked acceptably, but I'm trying to avoid running the KDE stack if possible, and would prefer something lightweight with zenity's versatility. It seems that it might be possible to arrange for these problems to be resolved by setting the WM_CLASS, but I'm in a bit over my head there. It might also be possible to make modifications to the window after it launches with a script, but again I'm not sure where to look for resources on that.

    Read the article

  • python: os.system does not execute shell comand

    - by capoluca
    I need to execute shell command in python program (I have ubuntu). More specifically I want to create graph using graphviz in python script. My code is os.system("dot -Tpng graph.dot -o graph.png") It does not work, but if I just type dot -Tpng graph.dot -o graph.png in command line then everything is fine. Do you know what the problem? Thank you! Edit: Does not work means that nothing happens, there are no errors. Output from dot -v -Tpng graph.dot -o graph.png: dot - graphviz version 2.26.3 (20100126.1600) Activated plugin library: libgvplugin_pango.so.6 Using textlayout: textlayout:cairo Activated plugin library: libgvplugin_dot_layout.so.6 Using layout: dot:dot_layout Using render: cairo:cairo Using device: png:cairo:cairo The plugin configuration file: /usr/lib/graphviz/config6 was successfully loaded. render : cairo dot fig gd map ps svg tk vml vrml xdot layout : circo dot fdp neato nop nop1 nop2 osage patchwork sfdp twopi textlayout : textlayout device : canon cmap cmapx cmapx_np dot eps fig gd gd2 gif gv imap imap_np ismap jpe jpeg jpg pdf plain plain-ext png ps ps2 svg svgz tk vml vmlz vrml wbmp x11 xdot xlib loadimage : (lib) eps gd gd2 gif jpe jpeg jpg png ps svg

    Read the article

  • Ubuntu 12.10 Unity & Gnome Shell problems

    - by user109292
    I'm experiencing some problems since I decided to upgrade Ubuntu to 12.10 version two days ago. Firstly, I cannot select the Unity environment I previously used on 12.04 without opening the terminal with Ctrl+Alt+T and typing setsid unity. When I select the Unity environment on the account page when I start the computer, it automatically switch back to Gnome and launch my session. I tried to set back Unity using the setsid unity tip, and it worked fine. But after few minutes, everything freeze and I cannot control anything anymore. The only option left is to press the Power button of my Asus EeePC and switch everything off. Question 1 : What can I do to get my Unity environment back on 12.10 from the start, without using the terminal every time? What should I do to prevent the all system to freeze once done? Secondly, and since I cannot use Unity for new, I'm using an other interface, GNOME Shell. What's bothering me is that the Activities bar (let's call it like that, 'cause I don't know the proper name) and the Internet bar (or any bar from any other window) cannot merge into one another, reducing the display of the screen I'm actually using to peanuts! Question 2 : Is there a way to merge those two bars? Or is there a way to hide the Activities bar when I'm not using it like on Unity environment?

    Read the article

  • Gnome-shell partially freezes

    - by user568021
    My specs: Ubuntu 12.04.1 LTS, Gnome3, Dell Studio laptop This is not happening all the time, but only sometimes .. totally randomly. When I'm in the middle of some work something totally weird happens. Keyboard suddenly stops working. I can't type, no matter which key I press nothing happens. I can't press Alt+Tab, I can't press Alt+F4, Alt+F2... nothing. Activities button is dead. Also right click does not work...and something even more annoying. I can click on the 'menu' in the top right corner(the menu pops up), but clicking on 'power-off' or 'suspend' option doesn't do anything. The only little thing I can do is: Close the lid of my laptop so it goes to sleep. Than wake it up again. And than it's ok. Everything works. So I guess restarting (or refreshing) gnome-shell fixes the problem. Sorry if the title of this question is odd... I don't know how to properly describe this.

    Read the article

  • Unity install removed window borders, and display drivers.

    - by Vivek Sharma
    I installed unity, used for a while. Then i installed gnome-shell, used it for a while. Now decided to switch back to standard. Gnome is not working the way it use to be. I am using T61 with nvidia-latest drivers. Following issues... Window borders are not showing. Installed compiz settings, and re-check window decorations option. I had to re-install nvidia driver, as when I tried to apply normal visual effects, it said no display driver found. Gnome panel is not coming, and mouse pointer is a "cross" than a "arrow". I then opened a terminal and enter gnome-panel. Panel came and window borders came back. Nothing is showing on desktop, and the right click is also not populating the menu. When i loging, an error message saying, docky did not start and it requires compiz to work. After starting gnome-panel from terminal, i went to systempreferencesAppearance. And selected normal visual effects. It activated, i selected keep the settings. Now when i restart or re-login, everything is gone. I have to run gnome-panel manually, and then re-enable visual setting. Ofcourse i can add gnome-panel in startup applications, but i want to know what has installing unity/gnome-shell has done, that these setting are messed up. I manually removed mutter, as Appearance application was showing mutter installed, cant enable effects. What shall i do to get back a standard gnome-desktop back.

    Read the article

  • Execute linux AT Command via PHP

    - by ahmad Rabie
    When I run this code via ssh echo wget http://domain.com/send_me_email.php | at 12:54 it run correctly and send me an email at that time. but if I run a php Like this exec("echo wget http://domain.com/send_me_email.php | at 12:54"); exec("atq",$arr); print_r($arr); result of that code is something like this : job 63 at 2011-11-27 12:54 ,As you can see the job created successfully but I don't receive any Email at that time?! I test this line in php exec("wget http://domain.com/send_me_email.php"); and it send me an email, it means that I have permission to run exec and wget via php.but what is problem? I cant understand what is my problem. Please help me. thanks

    Read the article

  • Backup Exec job completed with exceptions: RWS_AttachToDLE

    - by HannesFostie
    2 of this weekend's jobs completed with exceptions, and mention "RWS_AttachToDLE". I get the feeling the job did in fact complete without missing data, but I would like to be 100% sure (and can't verify the backup myself right now - colleague is out of the office and the backup in question is a bit of a black box for me, it works but I am not familiar with its inner workings). Also, how can I prevent this from happening? Google didn't prove to be very helpful, and experts exchange seem to have changed their system so that you can't simply scroll down to see the answers to a particular question ;-)

    Read the article

  • Symantec Backup Exec Error on backup

    - by AliGibbs
    Recently we have moved some of servers from real servers- into virtual servers. Since then, we are getting errors like the following: Error category : Resource ErrorsError : e000fed1 - A failure occurred querying the Writer status. For additional information regarding this error refer to link V-79-57344-65233 This is happening on the virtual servers and also the real servers now. Looked on google and found some information- like running "vssadmin list writers" however none of these are showing an error.

    Read the article

  • Symantec Backup exec 2012 for SBS - moving data to offsite drives

    - by Will Lennard
    Can anyone advise how best to run the following strategy, or even if it is possible/sensible strategy? I am looking to backup an SBS server using BE2012 where the data is backed up on a weekly full backup, with subsequent daily incrementals till the end of the week, a fresh full backup will then be taken the next weekend, and the cycle repeats for 4 weeks, thus 4 full backups with incrementals. This months worth of backups will then be moved off to an offsite store via USB drive for safe keeping. Is this viable, sensible, or am i just a bit crazy? All ideas are welcome.

    Read the article

  • Getting output of a shell script in Cocoa

    - by Tristan Seifert
    Is there a way that lets me run a shell script, and display the output in an NSTextView? I do not want any input from the user to the shell script at all, since is is just called to compile a buch of files. The shell script part works fine so far, but I just can't figure out how to run it and show the output in an NSTextView. I know a shell script can be run using system() and NSTask, but how do I get it's output into an NSTextView?

    Read the article

  • Invoking cl.exe (MSVC compiler) in Cygwin shell

    - by barcarole
    I'm heavily using Cygwin (with Putty shell). But, it's quite tricky to invoke cl.exe (i.e., Visual C++ compiler toolchain) in the Cygwin bash shell. Running vcvars*.bat in the bash shell doesn't work obviously. I tried to migrate VC++'s environment variables to Cygwin, but it's not that easy. Is there anyone who ever tried to run VC++ compiler in Cygwin bash shell? Thanks, JJ

    Read the article

  • Visual Studio Shell Based Application

    - by nils_gate
    My new project would be a custom IDE for proprietary Application creation. This can be a Shell based application on VS Shell. I wanted to know what are the license requirement for these kind of applications. My question: If I create my project as VS Shell based Application, what kind of license is required by the end user of the Shell based application?

    Read the article

  • How can I copy files with names containing spaces and UNICODE, when using a shell script?

    - by LOlliffe
    I have a list of files that I'm trying to copy and move (using cp and mv) in a bash shell script. The problem that I'm running into, is that I can't get either command to recognize a huge number of files, seemingly because the filenames contain spaces and/or unicode characters. I couldn't find any switches to decode/re-encode these characters. Instead, for example, if I copy "file name.xml", I get "*.xml" and a script error that the file wasn't found for my result. Does anyone know settings or commands that will deal with these files?

    Read the article

  • Shell script [Expected end of line, etc. but found unknown token]

    - by rockinthesixstring
    I'm trying to build a Synergy AutoStart script as per this article, the shell is giving me the error Syntax Error Expected end of line, etc. but found unknown token Here is the script I'm working on... #!/bin/sh . /etc/rc.common run=(/usr/local/bin/synergyc -n $(hostname -s) -1 -f 192.168.0.108) KeepAlive () { proc=${1##*/} while [ -x "$1" ] do if ! ps axco command | grep -q "^${proc}\$" then "$@" fi sleep 3 done } StartService () { ConsoleMessage "Starting Synergy" KeepAlive "${run[@]}" & } StopService () { return 0 } RestartService () { return 0 } RunService "$1" And when the error is thrown, the "period" is highlighted on this line . /etc/rc.common Is there something I'm missing here?

    Read the article

  • How do I embed an expect script that takes in arguments into a bash shell script?

    - by fzkl
    I am writing a bash script which amongst many other things uses expect to automatically run a binary and install it by answering installer prompts. I was able to get my expect script to work fine when the expect script is called in my bash script with the command "expect $expectscriptname $Parameter". However, I want to embed the expect script into the shell script instead of having to maintain two separate script files for the job. I searched around and found that the procedure to embed expect into bash script was to declare a variable like VAR below and then echo it.: VAR=$(expect -c " #content of expect script here ") echo "$VAR" 1) I don't understand how echoing $VAR actually runs the expect script. Could anyone explain? 2) I am not sure how to pass $Parameter into VAR or to the echo statement. This is my main concern. Any ideas? Thanks.

    Read the article

  • shell script fun! how to perform an action on each subdirectory from a given path??

    - by pocketfullofcheese
    I am writing a shell script (which I suck at) and I need some help. Its a script that is moving things from git to CVS (not important). The thing is, i a file path: controllers/listbuilder/setup/SubmissionRolesListbuilderHandler.inc.php and I need to be able to do: cvs add controllers; cvs add controllers/listbuilder; cvs add controllers/listbuilder/setup; cvs add controllers/listbuilder/setup/SubmissionRolesListbuilderHandler.inc.php Can someone help me out? The best I've come up with so far is to recursively add ALL files in my working tree, but that seems overly inefficient.

    Read the article

  • shell script fun! performing action on each subdirectory from a given path

    - by pocketfullofcheese
    I am writing a shell script (which I suck at) and I need some help. Its a script that is moving things from git to CVS (not important). The thing is, i a file path: controllers/listbuilder/setup/SubmissionRolesListbuilderHandler.inc.php and I need to be able to do: cvs add controllers; cvs add controllers/listbuilder; cvs add controllers/listbuilder/setup; cvs add controllers/listbuilder/setup/SubmissionRolesListbuilderHandler.inc.php Can someone help me out? The best I've come up with so far is to recursively add ALL files in my working tree, but that seems overly inefficient.

    Read the article

  • From a shell script open a new tab in a specific instance of Firefox.

    - by toc777
    Hi everyone, I have a shell script that creates Firefox profiles and then uses them to open multiple instances of Firefox simultaneously. The problem is how can I open a URL in a particular instance of Firefox? I have tried firefox -CREATEPROFILE test firefox -P 'test' -no-remote firefox -P test -url www.google.ie But the last part which is trying to open the URL using the test profile does not work, it always opens in then default profile. Is there any way to tell Firefox from the command line to open a URL using a particular profile? Thanks.

    Read the article

  • How to get the list of files in a directory in a shell script?

    - by jrharshath
    Hi, I'm trying to get the contents of a directory using shell script. My script is: for entry in `ls $search_dir`; do echo $entry done where $search_dir is a relative path. However, $search_dir contains many files with whitespaces in their names. In that case, this script does not run as expected. I know I could use for entry in *, but that would only work for my current directory. I know I can change to that directory, use for entry in * then change back, but my particular situation prevents me from doing that. I have two relative paths $search_dir and $work_dir, and I have to work on both simultaneously, reading them creating/deleting files in them etc. So what do I do now? PS: I use bash.

    Read the article

  • Linux shell to restrict sftp users to their home directories?

    - by hfidgen
    I need to give SFTP access to a directory within my webroot on my server. I've set up ben_files as a user and have set his/her home directory to /var/www/vhosts/mydomain.com/files That's all fine if he/she connects with plain old FTP - he's/she's restricted just to that directory, but to enable SFTP I had to add him/her to bin/bash shell, which suddenly opens up my entire server... Is there a way of giving him/her SFTP access but without opening up all my directories? I'd really like him restricted to only his/her home ;)

    Read the article

  • Print column A only if any of B, C, D, E & G contains Failed using Linux shell

    - by user3626342
    A B C ............ till G sucnpde067.advancemags.com- Successful Full FS_UNIX_801_Fri_C Full_Backup 0B Failed Full FS_UNIX_801_Fri_B Full_Backup 0B ............ till G sucnpde066.advancemags.com- Successful Full FS_UNIX_801_Fri_C Full_Backup 0B Successful Full FS_UNIX_801_Fri_C Full_Backup 0B ............ till G slnssde052.advancemags.com- Failed Full FS_UNIX_801_Fri_B Full_Backup 0B Successful Full FS_UNIX_801_Fri_C Full_Backup 0B ........... till G slnssde048.advancemags.com- Failed Full FS_UNIX_801_Fri_B Full_Backup 0B Failed Full FS_UNIX_801_Fri_B Full_Backup 0B ............ till G Print column A only if any of B, C, D, E & G contains Failed using Linux shell Note -Coulmns are tab/comma seperated

    Read the article

  • like exec command in silverlight(save and load properties of Elements dynamically)

    - by Meysam Javadi
    i have some element in my container and want to save all properties of this elements. i list this element by VisualTreeHelper and save its attributes in DB, question is that how to retrieve this properties and affect them? i think that The Silverlight have some statement that behave like Exec in Sql-Server. i save properties in one line that delimited by semicolon.(if you have any suggestion ,appreciate) Edit: suppose this scenario: End-User choose a tool from Mytoolbox(a container like Grid) ,a dialog shown its properties for creation and finally draw Grid . in resumption he/she choose one element(like Button) and drop it on one of the grid's cell. now i want to save workspace that he/she created! My RootLayout have one container control so any of element are child of this.HERETOFORE i want create one string that contain all general properties(not all of them) and save to DB, and when i load this control, i create an element by the type that i saved and affect it by the properties that i saved; with something like EXEC command. is this possible ? have you new approach for this scenario(Guide me with example please).

    Read the article

  • Evaluation of environment variables in command run by Java's Runtime.exec()

    - by Tom Duckering
    Hi, I have a scenarios where I have a Java "agent" that runs on a couple of platforms (specifically Windows, Solaris & AIX). I'd like to factor out the differences in filesystem structure by using environment variables in the command line I execute. As far as I can tell there is no way to get the Runtime.exec() method to resolve/evaluate any environment variables referenced in the command String (or array of Strings). I know that if push comes to shove I can write some code to pre-process the command String(s) and resolve enviroment variables by hand (using getEnv() etc). However I'm wondering if there is a smarter way to do this since I'm sure I'm not the only person wanting to do this and I'm sure there are pitfalls in "knocking up" my own implementation. Your guidance and suggestions are most welcome. edit: I would like to refer to environment variables in the command string using some consistent notation such as $VAR and/or %VAR%. Not fussed which. edit: To be clear I'd like to be able to execute a command such as: perl $SCRIPT_ROOT/somePerlScript.pl args on Windows and Unix hosts using Runtime.exec(). I specify the command in config file that describes a list of jobs to run and it has to be able to work cross platform, hence my thought that an environment variable would be useful to factor out the filesystem differences (/home/username/scripts vs C:\foo\scripts). Hope that helps clarify it. Thanks. Tom

    Read the article

< Previous Page | 29 30 31 32 33 34 35 36 37 38 39 40  | Next Page >