2
votes
1answer
46 views

Start the script with sudo

I am trying to start the virtual machine(ORACLE VIRTUALBOX) using this script(script name:start_vm001.sh). START_VM=`/usr/bin/VBoxHeadless --startvm testvm001` EXECUTE_VM=`exec ...
0
votes
1answer
31 views

Ignoree a specific file in file count “wc -l”

e.g. I have directory like ABC. And this directory contain following files (it contain number of files i just include 4 fils here) 2014-04-29T06-19-20_17368f93ce.mp4.uploaded ...
0
votes
2answers
27 views

Find particular file from extension from particular directory

I want to find a particular filename from a particular directory. Also I don't know the file name on that particular directory. I only know the extension of that file i.e. ".uploaded". So using that ...
1
vote
1answer
25 views

Need help in the shell script - gunzip and file command

This is on Ubuntu 12.04. I have a custom webkit based application where "browser" saves bunch of cache files. When triaging the problems, I have to inspect the cache. The cache directory holds many ...
1
vote
1answer
70 views

Send me email everytime a certain file is accessed from my apache server

I want to have my server send me an email every time someone accesses a PDF file on my webserver. Perhaps: tail -f /var/log/apache.log | grep pdf > ??something?? How would I generate a new ...
0
votes
1answer
410 views

how to shutdown ubuntu server from shell script?

I wrote a simple shell script to shutdown ubuntu server. then created a cron job to execute this script at 23:59 everyday. #!/bin/bash sudo shutdown -h now I got this error message "sudo: no tty ...
3
votes
2answers
434 views

Bash script to run “pecl install oci8”

I am trying to create shell script that will do the initial provisioning of a vagrant vm (running Ubuntu 12.04). Everything (installing php, apache, oracle instantclient, etc,) works fine, except for ...
0
votes
1answer
120 views

Cron unable to run shell script

I have been trying to get a shell script to run for hours using cron to no avail. I am trying to have the following bash script run every minute #!/bin/bash ...
1
vote
1answer
211 views

Ubuntu start Node.js server and open Chrome in kiosk mode

I'd like for a computer to immediately start a Node.js application on boot. I'd then like Chrome to open in Kiosk mode, but only after the server has been started. Looking on the Ubuntu Stack ...
1
vote
0answers
35 views

Is there any way to see make file with all variables substituted

I have huge long makefile written by some other guy, where all coomands contain variables. In order to decode what this command is doing i have look around what that variable is and its taking too ...
0
votes
0answers
86 views

Chrome OS sudo startunity app

I am running crouton unity on a Samsung chrome-book. How do i automate a shell script to start unity into a chrome OS app that I can place on the chrome shelf next to the other chrome apps? i want ...
1
vote
1answer
211 views

In a Shell scripts, check version of installed package, make a decision based on output

Looking to write a cross distro / cross version shell script that makes sure a forced version of PHP is installed Example: Ubuntu 12.04 has 5.3, Ubuntu 13.10 has 5.5, Debian 7 has 5.4 I need this ...
0
votes
0answers
53 views

Energy volume calculation script

Hi I want to write a shell script for energy and volume calculations for different lattice constants. For convergence of energy,using siesta. can anyone help I tried this work manually but now want to ...
2
votes
1answer
287 views

Running commands and shell scripts in Ubuntu

I'm trying to run a shell script in Ubuntu to flash my Firefox OS phone. I've downloaded and unzipped the new version. I've launched the shell and navigated to the directory where the .sh file is. ...
-2
votes
1answer
193 views

Merging two folders with the same or different names

How can I merge two folders with the same or different names with subdirectories, using shell script or terminal. Also, if there is a file with the same name, then it should skip.
1
vote
1answer
105 views

bad interpreter shell script

Hi I'm trying to write a shell script for plotting with gnuplot however I keep running into the error: bash: ./plot.sh: usr/bin/gnuplot: bad interpreter: No such file or directory I have checked the ...
0
votes
1answer
40 views

two crons not running simultaniously? [duplicate]

MAILTO="" */10 * * * * /bin/bash /var/www/sym_monitor/sym_start.sh > /var/www/migrate/root_start.txt 2>&1 */10 * * * * /bin/bash /var/www/sym_monitor/stop.sh > ...
0
votes
0answers
12 views

shell script not running the other script inside it [duplicate]

#!/bin/bash value=$(</var/www/sym_monitor/man.txt) if [ "$value" == "true" ]; then ps -ef|grep sym |grep -v grep |awk '{ print $2 }'|sudo xargs kill -9; cd /var/www/symmetric-ds-3.1.6/bin; ...
0
votes
1answer
636 views

Command not executing inside shell script?

#!/bin/bash value=$(</var/www/sym_monitor/man.txt) if [ "$value" == "true" ]; then ps -ef|grep sym |grep -v grep |awk '{ print $2 }'|sudo xargs kill -9; (cd ...
0
votes
2answers
211 views

crontab not working properly

When I run a script manually using root it is working fine. when I execute the same script inside cron it is not running. I checked the cron is actually calling the script but the script is not ...
2
votes
1answer
133 views

How do I grant higher privileges to a user in linux (Ubuntu server)?

First off, yes I am root. I have another account setup without shell privileges, and without a home directory (for icecast), that now I want to be able to run a script from that uses private key based ...
2
votes
2answers
2k views

Automatically mounting Truecrypt volumes at user login time

I need to mount a Truecrypt volume automatically at user login time. This volume is specific for each user. I'm not sure how to proceed since I'm not extremely familiar with Linux and the various ...
1
vote
2answers
3k views

Startup script on Ubuntu 12.04 not getting executed. Dependencies / load order.

I want to create a simple startup script on Ubuntu 12.04: myscript.sh #!/bin/sh sudo /etc/init.d/nginx start cd ~/app/current god -c config/resque.god sudo /etc/init.d/redis-server start echo ...
0
votes
1answer
35 views

Creating a link to name changing directory

I have an Ubuntu 12.04 installed using wubi + Win7. I'm trying to create a link to "my documents" directory which located in my C drive: C:\Users\Myuser\My Documents\ Since the Ubuntu is installed ...
5
votes
3answers
3k views

Test if a package is installed in APT

I want a shell script method to test/report if a package is installed. I don't need details, only boolean return to set logic flow. I looked at Find if a package is installed, but dpkg returns complex ...
1
vote
1answer
351 views

How to check for error when running mysql queries from an Ubuntu shell?

I'm running a shell script to do various things for me. The idea is to add it to crontab. Here's a sample command to show databases: EMAILID="some@Gmail.com" T="/tmp/cleanup.info" echo "starting ...
2
votes
2answers
521 views

Shell script that starts a process, starts another process, then kills the first process

Let's imagine I have a client and a server on the same machine, and I'd like to script some interaction between them. I would really like a shell script to - Start server Put server in the ...
0
votes
2answers
1k views

Send email about status of cron job completion

I have some scripts that do usual stuff like backing up MySql database, gz, tar some files and put them on FTP or sync with some other backup/mirror system. Some scripts are running quite frequently ...
1
vote
3answers
2k views

MKV to MP4 transcoding script issues

Ok, this one has got me scratching my head - specially as I'm a scripting nOOb, and my *nix expeirence is basic to say the least. Summary Need to identify why the shell script for converting filers ...
3
votes
4answers
424 views

Answer “Enter Your Coice: [1-3]” via Shell Script

I have a problem in my shell script. I try to control an installation. During the installation there are a few questions which have to be answered. Like: "Enter your Choice [1-3]: " I want do ...
0
votes
2answers
224 views

What is wrong with my Linux installation if my script won't run with the following error messages

Trying to run some .sh scripts in a very cut down Ubuntu installation, but I'm getting messages of the following style: ./my_script: 61: [[: not found ./my_script: 61: ==: not found ./my_script: 61: ...
0
votes
2answers
691 views

how do you create a menu item in the Ubuntu applications menu which changes the current directory before running a shell script?

I'm looking to add a menu item to the applications menu in Ubuntu which will run a shell script. In order for the shell script to work I need to cd into the directory which contains the shell script. ...
3
votes
3answers
3k views

How do you get Ubuntu to automatically run a program every time the screen is unlocked?

I have a script I would like to have automatically invoked every time the screen is unlocked. Does Ubuntu provide some support for users who wish to do this?
1
vote
2answers
1k views

trouble using a scheduled task to run a shell script (ubuntu linux)

I'm trying to create a scheduled task that runs a shell script recurrently, and I'm having some trouble getting it to work. I give it the following command to run every minute: ...
1
vote
2answers
610 views

getting first non display number in use

I need to give a command like Xvfb :6 -screen 0 1024x768x24 Where 6 can be a display number. Now Xvfb can already be using that Display, so how do I get the first display number not in use?
2
votes
3answers
109 views

How to configure a command to run on login, but only if through telnet

I want to run a command every time I log in to my Ubuntu box, but only if I'm connecting through telnet, not if I'm logging in at the console.