Search Results

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

Page 65/271 | < Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >

  • Better way to do "echo $x | sed ..." and "echo $x | grep ..."

    - by DevSolar
    I often find this in scripts (and, I have to admit, write it myself): a=`echo $x | sed "s/foo/bar/"` or if echo $x | grep foo then ... fi Consider "foo" to include some regex stuff. I feel that there should be - and most likely is - a better way to phrase this, one that does not involve two commands and a pipe but wraps the thing into some more compact expression. I just can't find it. Anybody?

    Read the article

  • How can I tell when an FTP is complete?

    - by identry
    I have a cron job that processes files that my client's upload via FTP to my FreeBSD server. The cron job runs once an hour, and normally processing each file only takes a few seconds. The cron job looks in the client's upload directory and moves any new files to a tmp directory. It then processes the file(s) and moves them into a final directory where they are then available to the public through a website. The problem is, every once in awhile, the cron job runs just as a new file is being uploaded. It moves the half-uploaded file to the tmp directory, and tries to process it, and fails, of course. Question: how can I determine if the uploaded file is complete? The only thing I can think of is checking the file size to see if it's changing, but that seems like a kludge. Is there some sort of flag or something that is set when the upload is complete?

    Read the article

  • Architectural approaches to creating a game menu/shell overlay on PC/Linux?

    - by Ghopper21
    I'm am working on a collection of games for a custom digital tabletop installation (similar to Microsoft Surface tables). Each game will be an individual executable that runs full-screen. In addition, there needs to be a menu/shell overlay program running simultaneously. The menu/shell will allow users to pause games, switch to other games, check their game history, etc. Some key requirements of the shell: it intercepts all user input (mainly multitouch) first before passing it on to the currently running game (so that it can, for instance, know to pop-up at a "pause" command); can reveal on arbitrary portions of the screen, with the currently running (but presumably paused) game still showing underneath, ideally with its shape/size being dynamic, to allow for creation of an animated in/out drawer effect over the game. I'm currently looking into different architectural approaches to this problem, including Fraps and DirectX overlays, but I'm sure I'm missing some ways to think about this. What are the main approaches I should be considering? (Note the table is currently being run by Windows PC, but it could potentially be a Linux box instead.)

    Read the article

  • What is the *right* way to use gnome-shell integrated chat?

    - by stevejb
    Please bear with me as I am still figuring out how to use gnome-shell. My question concerns how to use the integrated chat correctly. I have the following questions: 1) When people chat with me, it pops up as a notification on the hidden bar at the bottom of the screen, and then that chat stays there so I can access it later. How do I initiate a chat in this manner, without opening an empathy window? What I have been doing is Hitting super key Typing in the person's name, which brings up contacts Initiate the chat using empathy Immediately close the chat window When the person responds, it comes through as a notification. I then proceed to interact with the chat this way. 2) What is the keyboard shortcut for bringing up the notifications bar? Ideally, I would like to have the following experience Use some keyboard shortcut to bring up notifications Begin typing the name of the notification that I wish to investigate, and have the matching work in a fuzzy manner, much like Ido mode's buffer switching matching in Emacs When then right name is matched, I hit enter and then bring up the chat with that person as that popup notification. Are these behaviours supported? If not, I would be happy to work on implementing them. I am an experienced programmer, but not familiar with gnome-shell. If someone would point me in the right direction in terms of if this behaviour is supported, or where in the gnome-shell framework would I add to to get this behaviour, I would really appreciate it. Thanks!

    Read the article

  • Find folders with specific name and no symlink pointing to them

    - by Stefan
    Hey guys, I'm trying to write a shell script under linux, which lists all folders (recursively) with a certain name and no symlink pointing to it. For example I have /home/htdocs/cust1/typo3_src-4.2.11 /home/htdocs/cust2/typo3_src-4.2.12 /home/htdocs/cust3/typo3_src-4.2.12 Now I want to go through all subdirectories of /home/htdocs and find those folders typo3_*, that are not pointed to from somewhere. Should be possible with a shellscript or a command, but I have no idea how. Thanks for you help Stefan

    Read the article

  • gzip: stdout: File too large when running customized backup script

    - by Roland
    I've create a plain and siple backup script that only backs up certain files and folders. tar -zcf $DIRECTORY/var.www.tar.gz /var/www tar -zcf $DIRECTORY/development.tar.gz /development tar -zcf $DIRECTORY/home.tar.gz /home Now this script runs for about 30mins then gives me the following error gzip: stdout: File too large Any other solutions that I can use to backup my files using shell scripting or a way to solve this error? I'm grateful for any help.

    Read the article

  • Restoring/Restarting a java daemon from crash

    - by Ashish
    Hello, I am running a java app as daemon on a linux machine using a customized shell script. Since I am new to java and linux, I want to know is it possible that the app itself resurrects itself(just like restart) and recovers from cases like app crashing, unhandled exceptions or out of memory etc. thanks in advance Ashish Sharma

    Read the article

  • problem with awk script

    - by Samantha
    Hello, when I call my awk script, I keep getting an error : sam@sam-laptop:~/shell/td4$ awk -f agenda.awk -- -n Robert agenda.txt awk: agenda.awk:6: printf "Hello" awk: agenda.awk:6: ^ syntax error the script contains this : #!/usr/bin/awk BEGIN { } printf "Hello" END { } Thank you

    Read the article

  • How to read data from keyboard and store it in a file, shellscript

    - by Sunil Kumar Sahoo
    Hi I have a file try.SPEC. This file contains a word "Version: 1.0.0.1" . Now I want to write a shell script which will read the version number from keyboard and insert in the file. eg- if the user enters the version number as 2.1.1.1 then the file will have Version: 2.1.1.1" instead of "Version: 1.0.0.1". like this i want that i must be able to change irrespective of knowing what is the version number present in the spec file Thanks Sunil Kumar Sahoo

    Read the article

  • pdf2swf using MAC OS Batch command or Apple script

    - by Garth Humphreys
    How do I write a batch process on the Mac for pdf2swf, I want to convert all pdfs in a folder into swf. But pdf2swf doesn't have a option to convert a folder of pdfs to swfs, you have to do it one at a time. I'm not sure how if I should use a Apple script or a Shell script, either one I'm not sure how to get or assign a file name variable. pdf2swf file_name_variable.pdf -o file_name_variable.swf -T 9 -f Thanks

    Read the article

  • Run Linux command as predefined user

    - by vijay.shad
    Hi all, I have created a shell script to start a server program. startup.sh start When above command will executes, it will try starts the server as adminuser. To achieve this my script has written like this. SUBIT="su - adminuser -c " SERVER_BOX_COMMAND_A="Server" ############## # Function to start cluster function start(){ $SUBIT "$SERVER_BOX_COMMAND_A" } When i execute the command it asks for password. Is there any other way to do this so, it will not ask for password.

    Read the article

  • UNIX script to convert queries

    - by Harish
    I need a UNIX shell script to convert my queries from Java compatible to Oracle compatible format. ie. I have all the java compatible queries: java: SELECT a, b, c, d, e, f,g "+// "from test where year(timestamp)=year(today) and month(timestamp)=month(today) " +// "and day(timestamp)=2 and h='" + "W" + "'" Oracle SELECT a, b, c,d,e,f,g from test where year(timestamp)=year(today) and month(timestamp)=month(today) and day(timestamp)=2 and h='W' Is it possible using sed or awk?

    Read the article

  • untar filename.tr.gz to directory "filename"

    - by Jorre
    I would like to untar an archive e.g. "tar123.tar.gz" to directory /myunzip/tar123/" using a shell command. tar -xf tar123.tar.gz will decompress the files but in the same directory as where I'm working in. If the filename would be "tar233.tar.gz" I want it to be decompressed to /myunzip/tar233.tar.gz" so destination directory would be based on the filename. Does anyone know if the tar command can do this?

    Read the article

  • OS X terminal command to resolve path of an alias

    - by Josh
    I'm writing a shell script which will rsync files from remote machines, some linux, some macs, to a central backup server. The macs have folders on the root level containing aliases of all files/folders which need to be backed up. What is a terminal command I can use to resolve the path to the files/folders the aliases point to? (I'll need to pass these paths to rsync)

    Read the article

  • Why is the value of this string, in a bash script, being executing?

    - by Ross
    Hello Why is this script executing the string in the if statement: #!/bin/bash FILES="*" STRING='' for f in $FILES do if ["$STRING" = ""] then echo first STRING='hello' else STRING="$STRING hello" fi done echo $STRING when run it with sh script.sh outputs: first lesscd.sh: line 7: [hello: command not found lesscd.sh: line 7: [hello hello: command not found lesscd.sh: line 7: [hello hello hello: command not found lesscd.sh: line 7: [hello hello hello hello: command not found lesscd.sh: line 7: [hello hello hello hello hello: command not found hello hello hello hello hello hello p.s. first attempt at a shell script thanks

    Read the article

< Previous Page | 61 62 63 64 65 66 67 68 69 70 71 72  | Next Page >