Search Results

Search found 3730 results on 150 pages for 'bash'.

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

  • How to run linux bash script from web browser?

    - by sahil007
    Hi I have web server on it also. I had made simple bash script using vi editor..which will open file and then add some lines into it at last it will save automatically...and after that 2-3 linux command will be run as a specific user. Now I want to do the same from web browser...so what I need to do for this? html?perl?python?cgi?....?which is easy way to do the same?

    Read the article

  • Leave bash script running on remote terminal while not logged in?

    - by mechko
    I have a bash script that takes several hours to run. While it's running, I would like to do other things, which may involve logging out or disconnecting from the internet (my script runs network tests on various computers). I understand that there is a command that would allow me to run my tests from a remote terminal and logout of the terminal while it runs. Does anyone know what this command is? Thanks

    Read the article

  • Is there a way of using ctrl-r after typing part of command in bash?

    - by skeept
    In bash the ctrl-r command is very useful, I type ctrl-r whatever and it searchs my history for commands containing the word whatever. But if I type whatever and realize that I would like search that word and hit ctrl-r nothing happens. Is there a way hitting a key and having it behaving as if I had typed ctrl-r whatever instead of whatever ctrl-r? I have the following in my .inputrc "\C-p": history-search-backward but this only works if the beginning of the line is the same.

    Read the article

  • KMenu & shell script

    - by allenskd
    I'm trying to make a very small shell script with a simple command and add it up to the KMenu. Well, thing is that once it launches the shell script, it closes it fast and I want to leave it open because the shell script attempts to create run a web application using a framework. I tried with this first #!/bin/bash play run /home/david/Projects/ZS then I tried with this #!/bin/bash konsole -e play run /home/david/Projects/ZSBlackboard In terminal, it runs perfectly, but in launcher.. not so much Any solution or suggestion is appreciated, thanks

    Read the article

  • bashrc script not accepting space in directory name

    - by faizal
    I have added a variable at the end of my ~/.basrc file : export xyz = /home/faizal/DEV/ADT workspace/xyz But if i open a new terminal, i get the error : bash: export: 'workspace/xyz': not a valid identifier So i try a variety of alternatives : export xyz=/home/faizal/DEV/ADT\ workspace/xyz export xyz="/home/faizal/DEV/ADT workspace/xyz" export xyz="/home/faizal/DEV/ADT\ workspace/xyz" export xyz='/home/faizal/DEV/ADT workspace/xyz' export xyz='/home/faizal/DEV/ADT\ workspace/xyz' They all give me the error when i try cd $xyz: bash: cd: /home/faizal/DEV/ADT: No such file or directory What am i doing wrong?

    Read the article

  • How to create a script which opens the browser and logins to a particular Gmail account?

    - by TechGuru
    I have created a bash script login.sh. I want it to open the browser and login to my Gmail account. I tried using the following command to open the browser with www.gmail.com. xdg-open http://gmail.com It opens Gmail home page perfectly. But I don't know how to pass the username and password for login to Gmail from the bash script. Is it possible to open the browser and login to Gmail from a script?

    Read the article

  • Capturing output of find . -print0 into a bash array

    - by Idris
    Using find . -print0 seems to be the only safe way of obtaining a list of files in bash due to the possibility of filenames containing spaces, newlines, quotation marks etc. However, I'm having a hard time actually making find's output useful within bash or with other command line utilities. The only way I have managed to make use of the output is by piping it to perl, and changing perl's IFS to null: find . -print0 | perl -e '$/="\0"; @files=<>; print $#files;' This example prints the number of files found, avoiding the danger of newlines in filenames corrupting the count, as would occur with: find . | wc -l As most command line programs do not support null-delimited input, I figure the best thing would be to capture the output of find . -print0 in a bash array, like I have done in the perl snippet above, and then continue with the task, whatever it may be. How can I do this? This doesn't work: find . -print0 | ( IFS=$'\0' ; array=( $( cat ) ) ; echo ${#array[@]} ) A much more general question might be: How can I do useful things with lists of files in bash?

    Read the article

  • using flock in bash, why does killing a child process kill the parent process too?

    - by Robby
    In the code snippet below, I want the script to be limited to only running one copy at a time, and for it to restart server.x if it dies for any reason. Without flock involved, the loop correctly restarts if I kill the server process, but once I use flock to ensure the script is only running once, if I kill server.x it also kills the parent process. How can I ensure that killing the child process in a flock script keeps the parent around? #!/bin/bash set -e ( flock -x -n 200 while true do ./server.x $1 done ) 200>/var/lock/.m_rst.$1.lock

    Read the article

  • 'No such file or directory' error in bash, but the file exists?

    - by michael
    On Ubuntu, I get a 'No such file or directory' error when I try to execute a command. I have checked with 'ls -la' , the file 'adb' is there and it has 'x' flag So why I am getting a 'No such file or directory'? ~/Programs/android-sdk-linux_x86/platform-tools$ ./adb bash: ./adb: No such file or directory ~/Programs/android-sdk-linux_x86/platform-tools$ ls -la total 34120 drwxrwxr-x 3 silverstri silverstri 4096 2011-10-08 18:50 . drwxrwxr-x 8 silverstri silverstri 4096 2011-10-08 18:51 .. -rwxrwxr-x 1 silverstri silverstri 3764858 2011-10-08 18:50 aapt -rwxrwxr-x 1 silverstri silverstri 366661 2011-10-08 18:50 adb -rwxrwxr-x 1 silverstri silverstri 906346 2011-10-08 18:50 aidl -rwxrwxr-x 1 silverstri silverstri 328445 2011-10-08 18:50 dexdump -rwxrwxr-x 1 silverstri silverstri 2603 2011-10-08 18:50 dx drwxrwxr-x 2 silverstri silverstri 4096 2011-10-08 18:50 lib -rwxrwxr-x 1 silverstri silverstri 14269620 2011-10-08 18:50 llvm-rs-cc -rwxrwxr-x 1 silverstri silverstri 14929076 2011-10-08 18:50 llvm-rs-cc-2 -rw-rw-r-- 1 silverstri silverstri 241 2011-10-08 18:50 llvm-rs-cc.txt -rw-rw-r-- 1 silverstri silverstri 332494 2011-10-08 18:50 NOTICE.txt -rw-rw-r-- 1 silverstri silverstri 291 2011-10-08 18:50 source.properties

    Read the article

  • How to enter a bash script at the command line, but not process the script until the entire script h

    - by MHGL
    I am performing some interactive testing using HP's QuickTest Professional and Linux. I am connecting via SSH and feeding the BASH script lines directly into the command line. The problem I'm having is that the script executes as it is entered. I'm attempting to find a way that I can feed the script to the command line, but save execution until the entire script is complete. Anyone have any experience around doing this? I'll admit, it isn't the ideal way to perform this, but it's what I'm faced with at the moment. Any other suggestions are welcome. Thanks!

    Read the article

  • Bash & 'su' script giving an error "standard in must be a tty".

    - by sHz
    Folks, I'm having an issue with a bash script which runs a particular command as a different user. The background: Running on a Linux box (CentOS), the script is quite simple, its starting the hudson-ci application. declare -r HOME=/home/hudson declare -r RUNAS=hudson declare -r HOME=/home/hudson declare -r LOG=hudson.log declare -r PID=hudson.pid declare -r BINARY=hudson.war su - ${RUNAS} -c "nohup java -jar ${HOME}/${BINARY} >> ${HOME}/${LOG} 2>&1; echo $! > ${HOME}/${PID}" & This is the bridged version of the script, when run, the script exists with "standard in must be a tty". Any ideas on what I could be doing wrong? I've tried Dr Google and all the advise hasn't helped thus far.

    Read the article

  • How Do I Make A Bash Script for Git Checkin/Checkout?

    - by ServerChecker
    I was thinking of bringing up a git service on an Ubuntu server. However, the way me and another programmer operate -- we really want to try and stick to one person working on a project at a time. How would I make a Bash script to create a check in and check out with git? We want to prevent anyone from checking in code that hasn't already been checked in, and it should error out with the name of the person who has the code checked out. EDIT: I'm not really interested in using Git with its fantastic diff features. I move 100mph and don't have time to play diff games with the other developers. That's why we're using Git. If the other developers want to play the diff game, they can still do so. But when I check something out, I want it locked to everyone until I check it back in again.

    Read the article

  • Bash script getting automatically deleted from Ubuntu 12.04 Server?

    - by Kris Anderson
    I'm running a bash script on an ubuntu 12.04 through cron. The script works fine for a few weeks (runs daily backups of websites, mysql databases, and copies to Amazon S3). However, twice now I've noticed that backups stopped happening. Both times the backup script (backupscript.sh) located in my home folder was no longer there. No one else has access to this server, so nothing was manually changed on the server and no one deleted the file by mistake. The cron job (nano /etc/crontab) still references this script, but the script itself disappears. What could cause this to happen? Does Ubuntu delete the script if it runs into some sort of error?

    Read the article

  • In BASH, are wildcard expansions guaranteed to be in order?

    - by ArtB
    Is the expansion of a wildcard in BASH guaranteed to be in alphabetical order? I forced to split a large file into [10Mb pieces][1] so that they can be be accepted by my Mercurial repository. So I was thinking I could use: split -b 10485760 Big.file BigFilePiece. and then in place of: cat BigFile | bigFileProcessor I could do: cat BigFilePiece.* | bigFileProcessor In its place. However, I could not find anywhere that guaranteed that the expansion of the asterisk (aka wildcard, aka '*' ) would always be in alphabetical order so that .aa came before .ab ( as opposed to be timestamp ordering or something like that ). Also, are there any flaws in my plan? How great is the performance cost of cating the file together?

    Read the article

  • How do I turn of "auto-echo" in bash when I 'cd'?

    - by Avery Chan
    I don't know when this started happening but now, every time I cd to a directory it echoes the path right before it changes directories. This happens when I log into a server but doesn't happen on my local machine. The server is running Linux. My local machine is running Mac OS X. I searched the Google as well as looked at the bash man page but I couldn't find anything. My .bashrc/.bash_profile doesn't have anything related to 'cd' (that I know of). How do I modify this "feature"?

    Read the article

  • How can I check for a string match AND an empty file in the same if/then bash script statement?

    - by Mike B
    I'm writing a simple bash script to do the following: 1) Check two files (foo1 and foo2). 2) If foo1 is different from foo2 and foo1 NOT blank, send an email. 3) If foo1 is the same as foo2... or foo1 is blank... do nothing. The blank condition is what's confusing me. Here's what I've got to start with: diff --brief <(sort ./foo1) <(sort ./foo2) >/dev/null comp_value=$? if [ $comp_value -ne 0 ] then mail -s "Alert" [email protected] <./alertfoo fi Obviously this doesn't check for blank contents. Any thoughts on how to do that?

    Read the article

  • Can I use Cygwin as a replacement for Ubuntu, for bash script testing?

    - by Jeroen De Meerleer
    Next wednesday i'm having an exam on Operating Systems. In this exam there will also be a part bash-scripting. The teacher itself will test the scripts in a Virtual Machine running Ubuntu. Myself, however, I'm having serious troubles with running the latest Ubuntu (14.04 LTS) on a Virtual Machine (there are troubles with gnome running very slow). So I'm thinking about using Cygwin, which is doing the job great for another course. The teacher already confirmed I can use that, but I'm thinking he doesn't know it at all. I've already tested the scripts we made in class and they're all running without errors. But I'm quite sure there are some things I have to mind on. My question: would you use Cygwin as a replacement for the Ubuntu VM? Or should I stick it with the VM (maybe by using a different config/platform).

    Read the article

  • bash-like features in sqlplus, rman and other Oracle command line tools

    - by Gilles Haro
    As far as I can remember, I have always been complaining about the lack of “recall last command” from within sqlplus. Such a basic thing, available in any bash shell or windows cmd terminal, remains missing with Oracle command lines tools. Thanks to davidw who published a post in the french blog EASYTEAM, it is now possible to use a simple rpm package rlwrap to enhance sqlplus, dgmgrl, rman, … tools and give them bash “recall/completion” capabilities. I installed it in a few minutes and I am already wondering how can people work without it. The steps are here : Get the rpm file from sites like RPM PBone. AS root, install the package rpm -ivh rlwrap-0.37-1.el5.x86_64.rpm As Oracle, create a dictionnary file (for autocompletion) . This file is made of a series of words to be used for autocompletion. Put in it the list of dictionary tables, the list of sql commands, the list of sqlplus commands… whatever your like. And use the <tab> key as you would in a bash shell. $HOME/.oracle_keywords Create an alias for sqlplus alias sqlplus='/usr/bin/rlwrap -if $HOME/.oracle_keywords $ORACLE_HOME/bin/sqlplus' And enjoy it !!! Thank you DavidW. Gilles Haro Technical Expert - Core Technology, Oracle Consulting  Technorati Tags: rlwrap bash sqlplus

    Read the article

  • Terminal closing itself after 14.04 upgrade

    - by David
    All was fine in 12.04, in this case I'm using virtualbox in Windows. Last days the warning message about my Ubuntu version no longer being supported was coming up pretty often, so, yesterday I finally decided to upgrade. The upgrading process ran ok, no errors, no warnings. After rebooting the errors started to happen. Just after booting up there were some errors about video, gnome, and video textures (sorry I didn't care in that moment so I don't remember well). Luckly that went away after installing VirtualBox additions. But the big problem here is that I can't use the terminal. It opens Ok when pressing control+alt+t, but most of the commands cause instant closing. For example, df, ls, mv, cd... usually work, although it has closed few times. But 'find' causes instant close. 'apt-get' update kills it too, just after it gets the package list from the sources, when it starts processing them. I've tried xterm, everything works and I have none of that problems. I have tried reinstalling konsole, bash-static, bash-completion, but nothing worked. I have no idea what to do as there is no error message to search for the cause. It seems something related to bash, but that's all I know.

    Read the article

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