Ubuntu mencoder bash script

I need help putting the following mencoder command into a scriptmencoder movie.avi -sub movie.srt -subfont-autoscale 1 -o movie.hardsubs.avi -oac copy -ovc lavc -lavcopts vbitrate=1800I made a script called addsub and put $1 for the movie.avi; $2 for movie.srt and $3 for movie.hardsubs.avi. Unfortun ...

Ubuntu Test User password with Zenity/Bash script

I am working up a script, and what I need to do is test the entry made by a user into a zenity dialog against their password. If they enter the correct password (the one they logged in with) then the rest of the script will proceed.How can I call up a user's password in a bash script. Is there a var ...

Ubuntu Bash script with zenity just exits after it checks if a directory exists or not

I'm a creating a small bash script that will install one of my GTK themes with some GUI dialogs from zenity. I'm pretty new at this so I've run into my first trouble:#!/bin/bash ## Finds the user installing the themeuser=`who am I | awk '{print $1}'`# Starting the gui dialogszenity --question --text ...

Ubuntu Need help in creating bash script for controlling laptop fan speed.

I got a new Dell Inspiron 15R yesterday and installed Ubuntu 10.10. Everything works right out of the box except that the fan is always on even if the temp is as low as 30 Celsius.I found a way to control fan speed through some commands and installing a package i8kutils. Now I want to create a bash ...

Ubuntu Need help in creating bash script for controlling laptop fan speed.

I got a new Dell Inspiron 15R yesterday and installed Ubuntu 10.10. Everything works right out of the box except that the fan is always on even if the temp is as low as 30 Celsius.I found a way to control fan speed through some commands and installing a package i8kutils. Now I want to create a bash ...

Ubuntu Bash script help

I have a simple bash script I found on the net which can auto-start any program and run it for a specified time allotted. Now, what I'd like to do is to make it so when run, instead of having it run the program already listed in the script (under 'progID' as you can see in the scripts below), it ope ...

Ubuntu Help with a bash script

I have written the following bash script for a friend to add as a menu item and would like some input on it:#!/bin/bash# Filename: browseropen.sh# Version: 0.1# Date: April 13, 2010# Author: Ian MacGregor (aka ardchoille)# License: GPL# Requires: firefox, zenity# Description: This script opens a use ...

Ubuntu Bash script help

I'm trying to run a bash script on my computer, because Firefox doesn't properly close when I press Ctrl-Q (which I need to do fairly often, as Flash video can inexplicably lose sound capability)An output of terminal:patrick@patrick-laptop:~/Desktop$ ps -A|grep firefox6242 ? 00:00:00 firefox6251 ? 0 ...

Ubuntu gtkdialog filechooser bash script help

I wrote a quick dirty mencoder -> ffmpeg script to convert videos for my BB.I would like to add a gtkdialog filechooser option to it so I can browse to the file I want to convert.---------------------Script----------------------------#!/bin/bash# variablesVIDEO=$1# per model scaling-------------- ...

Ubuntu Nautilus Bash Script Involving Spaces in File Path

I have a bash script i am working on in order to extract audio from media files. It is based on ffmpeg, and the script is working perfectly on all input files except those with spaces... The main part of the script is the simple command: encode_audio (){ffmpeg -i "$1" -vn -ac "$channe ...

Ubuntu bash script error

hey, i'm just writing a simple script to join multi-part avi files so i don't have to look up the mencoder arguments each time i have to do it and just as an exercise in learning bash script. this keeps giving me a syntax error at line 28 ( the first "fi"). nothing pops out at me. can anyo ...

Ubuntu Bash script for extracting sound from videos

This is a bash script I wrote because I hate doing this manually. It takes any video, like a youtube video, extracts the music/sound from it in .mp3 format, then deletes the old video.Have fun. Note, you will need mencoder to use it.#!/bin/bash## Converts video to .avi format# then extracts the mp3 ...

Ubuntu Bash script creation helper

I have a friend who writes a lot of bash scripts and nautilus scripts and was looking for an easy way to create skeleton scripts, via GUI (she doesn't like CLI-based editors yet), to automate some of her tasks. So, I put my scripting skills to work to write her a script helper. Here is what I came u ...

Ubuntu lftp bash script

i want to make a little bash script for my downloading need. i'm using lftp and want to use zenity as interface. but i'm having a problem as i dun really understand the lftp command. my script:#!/bin/shurl=`zenity --title="Lftp " --text="Enter url" --entry`lftp -e 'pget -n 40 ...

Ubuntu Multiple Drive Burning Bash Script Help

all, I've been working on a project for about a week and I've hit a wall with part of it. I have a bash script that allows me to burn a CD on multiple drives at once. The script itself works great as is but I'm looking to add a little idiot proofing to it. This is it at the current stage of developm ...

Ubuntu bash script to use rsync for file(s)/folder(s) copy?

I've been looking around and I can script a little, but I really could use a pointer if anyone knows where I can find a bash script that would do something similar to:I select a file or folder or group of files or folders, some may contain spaces in the names, right-click from PCmanfm (though I imag ...

Ubuntu need basic help with cat --> mencode -->ffmpeg using bash script

I have 9.04 running motion webcam software, which captures movies and writes them to avi files. I would like to have an automated way of concatenating the days avi files, converting them to h.264 m4a files and cleaning up the directory afterward. I have created a bash script that I thought should wo ...

Ubuntu BASH script Security problem?? Help!

I'm getting a wierd error when trying to run this executable bash script;#!/bin/bashgksusudo mkdir /tmp/setupsdebsudo cp -r *.* /tmp/setupsdebsudo cp -r ./install -d /tmp/setupsdeb/sudo mv -f /etc/apt/sources.list /etc/apt/sources.list.baksudo mv -f /etc/apt/sources.list.d /etc/apt/sources.list.d.ba ...

Ubuntu BASH script to make a local repository!!! The ultimate .deb script

I'm completely newto programing. I'm totally crap at it, but I'm ploughing away at a BASH script cause I believe that I have a really good idea.I'm making a script that downloads a deb plus all it's dependancies and packages it up into an executable archive with a metapackage. The user simply clicks ...

Ubuntu Need help converting PHP/BASH script to pure BASH

I thought it would be best to split this off from a previous topic I started as it was getting off track from my original question, so I apologize for the double-post.I wrote a PHP script that was heavily dependant on BASH because I couldn't quite get BASH to do what I wanted. This script will scan ...

Ubuntu load bookmark nautilus in bash script

helloI need to load the list of bookmarks nautilus in a zenity dialogueDo you know where they are locate and how i can load them in a bash script?ByeJean-Luc ...

Ubuntu Need help with bash Script.

I am making a script to download and save video or audio streams off the net because I hate watching them thru a webbrowser. I got it almost fully working, but I can't get $var1 to change to $var2 then to $var3, etc... when the for loop loops at the end. Also does anybody know a somewhat easy way, I ...

Ubuntu Simple BASH script to use rsync for local USB backup

I wrote a very simple bash script to keep me from having to re-learn rsync every time I want to make a change to my backup scheme. I'm using it to backup my home directory to an external USB drive attached to my 8.10 Thinkpad. I have it set up to run as a cron job every night.It's nothing fancy, but ...

Ubuntu gksu and gksudo won't work correctly in my bash script

whats problem in my script? gksu and gksudo won't work correctly in my bash script !!#!/bin/bash# --------------------------------------------------# Author: Mahdi Pishguy# Homepage: http://www.debian-ir.com/### gutil is free software; you can redistribute it and/or modify# it under the terms of the ...

Ubuntu Executing bash script as root in terminal via shortcut in Main Menu

Ok, this is the problem. I wrote bash script that uses zenity and a choice to install various programs, tested it and it works, but only when I call it from terminal. I wanted to add it in gnome main menu. The script is /home/eee/zenity.sh. In accessories I added an entry with command: /home/eee/zen ...

Ubuntu Bash script question...

Hello, I have a question about this bash script. I want to know how it does what it does, because I don't see how.find /dir/ -type f -exec chmod ugo-x {} \;find /dir/ -type d -exec chmod ugo+rx {} \;How does it change the files that is finds? I must have something to do with the "{} \", bu ...

Runing a bash script with php

Is thier a way to execute a bash script with php under linux? I need to make a web-menu that has the ability to update http-analize on command. - ...

MySQL insert data from bash script

I have a bash script that runs and collects data for me.. I want to insert this data into an mysql dbase.. since its bash.. figured that all i would have to do is use the mysql commands with the $varable names... no such luck.. any and all help would be ...

help...I need a bash script

I am running damnsmall linux installed to hard disk as debian and have installed sox and cronI am in need of a bash script that will use the play command to play a wav file repeatedly until I strike a key. and preferable opens a window with a message. The key strike thus ending the script- closeing ...

Control Lynx by bash script

I had tried to control lynx by bash script. I can use bash script to let lynx open an url. After that, I can't do anymore. I don't understand how to move the cursor or fill some textbox in the webpage opened by linx in bash script. Can anyone help me? ...

Ubuntu Latest kernal update stopped bash script from working

I have an entry in startup applications for <banshee --hide> to run banshee in its hidden state and i have a bash script entry which sleeps for a few seconds to allow time for the login sound and then plays a random song. Its been working fine for ages but the last kernal update seems to have ...

Ubuntu defining a path as a variable in bash script

I ran into a problem while writing a simple bash script.This is what I have so far:#!/bin/bashecho "input a path where the songs are:"read path;cd $path;ls;I think it is self explanatory, as to what the script does. The problem arises, when the path has a directory with spaces in it. So fo ...

Ubuntu Make bash script in panel output to terminal

To make my Ubuntu life easier, I've made some simple bash scripts to start up different sessions of software. I put them in the top panel so that I only need one click. However, some of them are rather... skittish, and might fail if the sleep commands aren't long enough. So I would really like to se ...

Ubuntu implementing hotkeys in bash script

is there any way where i can enter some hot key combinations in my bash script? Im not asking about shortcuts using hotkeys, but actually using hotkey combinations so that when i run my script these key combinations should work like a command.Actually i need this to automatically shift through ubunt ...

Bash script question

Hi, I have a bash script that calls a php script...#!/bin/bashif [ ( php.exe testing.php ) == "1" ]then/cygdrive/c/WINDOWS/explorer.exe /e,`cygpath -w -a "open.png"` &fimy testing.php file checks something online and echo's a 0 or a 1. How do I use this output value in my bas ...

Ubuntu bash script question

how do i write a bash script that opens a terminal and runs sudo -i, aptitude-update, and finaly update-manager? write now my basic update script i wrote looks like this #!/bin/bashsudo aptitude update && sudo apt-get upgradesudo apt-get autoclean but i like the idea of update manager better ...

Ubuntu Basic bash script - using &

I wrote a basic bash script, part of which includes the linesleep 10m && notify-send "message"I used update-rc.d with "default" to make this run on startup. The sleep command runs fine, but the notify-send command doesn't run.What's the deal yo? ...

Ubuntu Using find in a bash script ?

I mostly/always use find with -iname and directory as . So I want to make a bash script to do this so how will I get the search string into the bash script? So here the value of x will change every time I run the script so how will I get the value of x into the script?~!/bin/bash/ find . -iname ...

Ubuntu tar bash script for packaging c programs

Since I commonly need to wrap up c programs for submission for school, I created a bash script to do so:find -type f -regextype 'egrep' -regex '\.\/(.+\.[ch]|[Mm]akefile|README|.+\.html|.+\.css)' ! -regex '(.+memwatch\.[ch]|.+DEBUG\/.+)' | xargs tar cvf submit.tar(Find all files that are .c or h, th ...

Bash script to full program

I have a small bash script that I use to mount a netware server volume to my local machine(attached). I would like to make this into a small'ish program, that installs ncpmount with all accompanying software installs the bash script also, creates icons etc... How do I go about doing this? I didn't k ...

Ubuntu Bash Script with Variables?

Can someone tell me if it's possible to create a bash script with variables?What I'd like it to do is: encrypt a varible file (gpg -c filename) then delete the file I've just encrypted (shred -u filename) ...

Ubuntu Help with small bash script

All,I am trying to create a small bash script which reads a file with 3 values per line. I want to take those values and grep another file for them, if found, I want them to place that line in another file.Ex:Large file full of text (file.log)Definitions File (values to grep for)Line in definition f ...

need help with bash script

i have been trying to write a bash script and i keep getting error something about 4th line all i want to do is send a email that is called mail.txt to all the email addresses it finds in a file called emails.txt this is what i wrote and it doesnt work it gets the emails out of emails.txt and it try ...

Ubuntu bash script to iterate directory

I would like to start installing sun java manually as the repositories don't really stay up to date. I need to setup the alternatives my self then. Here is what I need to do:update-alternatives --install /usr/bin/java java /opt/java/<current_java>/bin/java --slave [all other binaries except 'j ...

Ubuntu Help with a bash script

guys, I am writing a bash script for a game server map backup - I currently have the script providing feedback to a file that I occasionally 'tail' when I am interested in how my daily backups are going - I would very much like it to give me some feedback on disk usage. I am fairly new to Linux so y ...

Bash script problem

I have a problem with a bash script I need to write for a course. I'm not looking for someone to answer the question for me, I could just do with a little nudge in the right direction.The task is pretty trivial, but the problem lies with the limited set of tools I have at my disposal. I have to writ ...

Ubuntu Bash Script

all, I am trying to create a bash script, the commands that are in the script require a password. How do I set it up where it will put in the password, or give me a popup that request my password (prefer this method). That is by clicking on it. I can run it from CLI and it will ask for my password, ...

Ubuntu Needed to add code to shutdown PC in my bash script.

Bonjour Guys!I'm making a bash script in which I'm downloading all URLs one by one through wget. After the task is done, I need to add code to shutdown my PC automatically.Now I know,sudo shutdown -h nowBut then I need to type password... Is there any way to store my password into script and when sc ...

Ubuntu Write a Simple Bash Script

:KS:pI need to write a simple bash script in ubuntu that will work for a class make up assignment.I dont want to copy from anyone,where can i go to learn.I have some example like bash scriting on ubuntu linux please tell me were to go to get started ...

Ubuntu Help with some simple BASH Script(s)

I'm having a lot of trouble trying to create a couple bash scripts. The first bash script I'm trying to create is a sort of "change directory" script where it first lists the current directory of the user, then lists the directory to which the user wants to go, and then goes there. So far, ...