0
votes
0answers
31 views

Ubuntu 14.04 HDMI UDev Script

I have tried multiple variations to this script but I cannot get it to work. The UDEV Rule fires the script and the script exectutes but simply does not change the audio profile. If I run the script ...
3
votes
1answer
53 views

Installing noip via sh script

I have this script: cd /usr/local/src/ wget http://www.no-ip.com/client/linux/noip-duc-linux.tar.gz tar xf noip-duc-linux.tar.gz cd noip-2.1.9-1/ make install <<END_SCRIPT Username password ...
0
votes
1answer
103 views

Writing a shell script in Ubuntu to process several layers as a single animated GIF file [duplicate]

I am an Ubuntu 12.04.4 LTS 32-bit user and I would like to automate the process of opening several PNG images as layers then saving these layers as a single animated GIF file in the GUI of GIMP. My ...
0
votes
1answer
107 views

Recursively delete hidden directory & its files?

I want to delete all hidden directoris from a directory and its sub-directory. I also use rm -rf .directory_name this command is iterative command I want to a recursive command. Please anybody help ...
-4
votes
3answers
6k views

How to get IP Address using shell script? [duplicate]

Want to get the IP address using Shell script. Without knowing the eth0 or eth1 or eth2 How to get the particular IP address. I am not interest to get localhost address, want to get private IP ...
-2
votes
2answers
2k views

how to execute a python program in a shell script

I have a python program in that I wrote some python code (disk.py). I executed this program using the command python disk.py in a terminal, it worked. Now I want to execute it using a shell script.
0
votes
1answer
598 views

Calling an email script from another script using ssmtp on ubuntu

I have an issue with a script, which works fine except that it only sends email when I run it directly from the shell but when called during crontab it doesn't send the emails. There are 2 scripts ...
4
votes
2answers
367 views

How do I run a script when I switch between keyboard layouts

I use more than one keyboard layout, and I would like to find a way to run a script when I switch between them. Is this possible? So far, I can assign a shortcut for a script like this: #!/bin/bash ...
2
votes
1answer
919 views

Environment variable for ip address

I see somewhere people use: IF_ADDRESS="$(echo "$IP4_ADDRESS_0" | cut -d'/' -f1)" to get the IP address in a network configuration script. In my system, I create a script under the directory ...
0
votes
1answer
261 views

Processing multiple mails in a Postfix mailbox by making cronjob run per second-is that considered good practice?

I need to process at least three thousand incoming emails an hour that are received in a postfix mailbox. Processing involves extracting email attachments and sending the content of an email ...
0
votes
1answer
607 views

Why is my shell script hanging on `apt-get -y upgrade`?

Ubuntu : sudo DEBIAN_FRONTEND=noninteractive apt-get -y update sudo DEBIAN_FRONTEND=noninteractive apt-get -y upgrade sudo reboot Script is always interrupted after upgrade and then it will stay on ...
1
vote
1answer
708 views

How can I test whether the output from a command is null or empty string? [closed]

I'm trying to get a pre-commit hook script to work on our old SVN box. It's very old, running Ubuntu Server 8.04. This script: @echo off :: :: Stops commits that have empty log messages. ...
2
votes
2answers
514 views

Ubuntu Bash - Changing permissions to user files for automating Apache VirtualHost creation

Moved here from AskUbuntu I currently have a small Ubuntu Server 12.04 machine (test environment) with about 3 non-root users created. Each user has their own public_html directory under their ...
0
votes
1answer
456 views

Starting Resque worker with script doesnt work, starting by hand does

I am trying to figure out why my process doesn't work if started via a script, but works fine if started by hand. Here's the details: script is a resque worker start script. The script location is ...
0
votes
1answer
131 views

Package Installation log creation

I have written a script for installing packages on Linux(Ubuntu). So I want to create a log file for installation of packages for troubleshooting if any problem occur during installation.So please ...
2
votes
2answers
2k views

How to write a shell script that gets executed on login in?

I am trying to write bash shell script in Ubuntu 11.10 Linux distro, that will get executed automatically on logging into the system. But I am not able to figure out that what to write in script that ...
12
votes
3answers
23k views

Shell script fails: Syntax error: “(” unexpected

I've been working on a script that automates setting up a development environment for Raspberry Pi development (step by step details that work are here). The script is linked in that article but ...
5
votes
3answers
9k views

Automating textual input from a bash script without using EOF

I'm running Ubuntu Linux. Suppose there is a program called myprogram. This program prompts the user for input; specifically, the user must type an integer when prompted and press Enter. I would ...
4
votes
4answers
5k views

How can I check if mysql is installed using a bash script?

I need to check if mysql is installed from within a bash script. What would be an efficient way of doing that? I thought I could do this: if [ ! -f `which mysql` ] ; then echo "foo" fi But I ...
-1
votes
2answers
3k views

clear tmpfs in my case

I am on a Ubuntu machine. I have make a directory under root directory, by: $ sudo mkdir /hello $ sudo mkdir /hello/bye Then I mount tmpfs with size 1024M to /hello/bye by: $ sudo echo "tmpfs ...
5
votes
2answers
3k views

How to pipe md5 hash result in shell

I am looking for a simple way to pipe the result of md5sum into another command. Something like this: $echo -n 'test' | md5sum | ... My problem is that md5sum outputs not only the hash of the ...
2
votes
4answers
2k views

Shell script error message

I am trying to learn shell scripting by reading linuxcommand.org. For some reason I keep getting the error "Not Found", even though it runs all the commands. The error codes I get are: ...