A shell script is a script written for the shell, or command line interpreter, of an operating system.

learn more… | top users | synonyms (1)

0
votes
0answers
7 views

Start a PHP Script from Startmenu (Lubuntu)

I try to start a PHP script directly from the start menu of Lubuntu. But it doesn't work the only thing who's happening is that it starts a Terminal. I setted the permissions with chmod a+x. Hers my ...
0
votes
1answer
12 views

Disabling touchpad when desktop starts

I would like to turn my touchpad off when my desktop starts. How can I do that? I already found that the following script outputs 14: xinput list | grep -Eo 'TouchPad\s*id\=[0-9]{1,2}' | grep -Eo ...
0
votes
0answers
7 views

how to write a shell script which gets notified when an avi file is played from terminal?

For my project purpose I want to write a shell script program which runs in the background and acts as a listener to a specified avi file. When that avi file is played from terminal my script file ...
0
votes
1answer
19 views

autogen.sh script failing with autoreconf2.50: automake failed with exit status: 1

I recently heard about the Maynard desktop, a replacement for LXDE on the Raspberry Pi, and I really liked it. I was just planning on installing it on my Pi, until I found out I could compile it for ...
0
votes
2answers
44 views

How to make a python script a command?

I'm trying to make a python script into a command, eg: google's ipaddr.py (http://code.google.com/p/ipaddr-py/). I want to be able to type ipaddr and it puts out what I want. Is this possible? I've ...
0
votes
2answers
33 views

Move images from sub-folders into new sub-folders

I have a folder composed of M several sub-folders, each of them containing some text files and N images (*.png) This is what the tree looks like: /parent/ /sub-folder1/ /data1.dat /data2.dat ...
1
vote
1answer
41 views

Bash script for execute one command for many files

I just tried to clear my holiday video stuff and found program for stibilizng vision. There are a lot of files so I made script to stabilize all. Firstly I need to run command: transcode -J ...
-3
votes
1answer
37 views

Scripting downloaded programs

I downloaded a game for fun and I would like to add it as part of my code for my butler program. Say I have the game moon-buggy and I would have this code run it. if [ $word = "buggy" ] then ...
0
votes
0answers
10 views

Recompile package (with applied .diff file) after every update

I have a .diff file which I use to patch unity source code and then recompile it, so I can remove trash icon from unity panel which is important to me. However after every update of Unity, the patched ...
1
vote
0answers
19 views

Make right+left click emulate middle click on wireless mouse

Anybody have or know of a sweet little workaround script I can set to running at startup that would allow my dilapidated mouse to keep providing me with middleclick functionality even though the ...
1
vote
1answer
27 views

How do I launch my script from a launcher?

I have my custom script in Ruby with read permission, which starts with: #!/usr/bin/env ruby I can run that script from the terminal by typing that path. I added a file with .desktop extention to ...
0
votes
1answer
30 views

startup script ubuntu 12.04

Each time I startup the sistem I need to run this command sudo xhost + and the sudo service myservice restart I have decided to add a script to startup to avoid having to type it each time myself. I ...
0
votes
2answers
30 views

lscpu output differs when called indirectly?

I use lscpu | grep 'MHz' to get my clock speed. I am getting different results based on the method I am calling this command. Method 1: typing it in the terminal CPU MHz: 1200.000 Method 2: ...
1
vote
1answer
29 views

zip I/O error: Protocol error in bash script

so here's the script that i am trying to get it work: #!/bin/bash filePath="$1" fileName="$( basename "$filePath" )" backupDir="/my/backup/dir/${fileName}-backups/" dateTime=$( date ...
0
votes
2answers
57 views

How to edit a specific line of textfile in terminal with a script?

I need to change a .config text file every time the program doesn't work as I want it to. I want to be able to do it in terminal preferably with an alias and with the following logic: alias ...
0
votes
0answers
34 views

Run multiple scripts using one script on boot?

I need help. I've tried several methods to get this to work. Basically, I home host a server on my PC, the problem is, I want it to be online when logged in as every user on the computer. It uses ...
0
votes
1answer
73 views

Can someone explain the working of this bash script?

I found the following bash script which I would like to run, but I am not completely sure about what it is going to do. Can someone explain the working of the following bash script; i.e. what is it ...
0
votes
1answer
34 views

How to “show” the script, NOT run it..?

So basically, I uploaded a script to textuploader, and then used the wget command to download it to my /etc directory. Now I am able to run the script by typing: perl ...BUT, what if I want to see ...
0
votes
0answers
32 views

How to shutdown Ubuntu after (2 hours) of idle?

Running: Xubuntu 14.04 32bit. I have read several outdated, not working, working different that I want answers here and elsewhere. I had a script that resulted in shutting my Laptop down at boot time ...
4
votes
2answers
238 views

regex search works with `grep -E` but not with bash script?

I use the same regex with grep and it gives me a match but when doing it in a bash script, it return no match. Test String(part of the file testregex.txt): <a ...
1
vote
3answers
63 views

Run Bash Script in Client from Local Server?

I wrote a bash script for my use and it works. I want that script to be put in some server in my network and call that script in laptops / desktops in my network itself to execute. Any way I have made ...
0
votes
1answer
22 views

Rename new files as the old ones

I have a large music collection, and a good number of playlists that I have formed over the years. All the music is neatly organised in a folder hierarchy. I have managed to get my hands on higher ...
0
votes
1answer
18 views

export list of duplicate images on digikam/findimagedupes/fsplint/geeqie

I have 60000 images. And when I ask any of the following tools to come up with similar photos, all of them pop out a big list of around 3000 names of images. digikam gives a cool UI which lets me see ...
1
vote
1answer
65 views

Need script for ubuntu

Need a script to use in ubuntu I've bunch of .tgz folders in folder A, each tgz is having some files and tar files, inside the tar files there are folders and sub folders. Wants to move a particular ...
0
votes
4answers
67 views

crontab not running as root

Mysql backup scripts not running as root crontab - help I'm trying to run a crontab as root but the script is not running successfully. I can see in syslog that the script is executing but it does ...
1
vote
1answer
35 views

Command line to check version of a file with wget?

http://paste.ubuntu.com/7159470/ Is there a way to check the version of a file using wget, and then download it if it's newer? Trying to make an update script/launcher for a game. wget ...
-1
votes
1answer
22 views

Rename default “Ubuntu one” folder on 12.04 server possible?

I'm running Ubuntu 12.04 server from home and using Ubuntu One as backup site. I'm not great at scripts (beginner) so when writing bash scripts that I later crontab for backups, having to use "Ubuntu\ ...
0
votes
1answer
54 views

How to clear history from a script? [duplicate]

I am writing an script to dump my history log into another file "myhistory.log", and then clear that history. I have written the following set of commands: date >> myhistory.log history ...
1
vote
1answer
70 views

How can I alphabetize a multi line record from a text file?

Hi I'm working with bash script and I have example.txt below. How can I alphabetize the following 4 information about restaurants by the restaurant name and print it out? Note that the format when ...
0
votes
0answers
18 views

Automatic shut down and reboot at specific time [duplicate]

I have an assignment that requires me to write a script that shuts down a server at 11pm and reboots it at 6am daily. So far, I have only written a command to shut it down but I do not know how to ...
2
votes
2answers
25 views

How can I write a script to install BleachBit only if the version installed is not a certain version?

I want to write a bash script to download and install BleachBit from a .deb file only if the version already installed is not 1.0. I am using Ubuntu 12.04 and Bleachbit is only version 0.9 in the ...
1
vote
2answers
70 views

Selecting multiple files with in bash

I want to use Scriptreplay with multiple log/timing files located in the same Directory. The script I have right now looks like this: select timings in /mnt/home/$USER/shell_logs/*; do clear ...
1
vote
1answer
18 views

Use a Radiolist with Scriptreplay

I want to crate a programm using dialog that gives me a radiolist of logfiles (working) and automatically replays them using scriptreplay but I can't get it to work because the filepath that gets ...
4
votes
1answer
128 views

How to batch rename files (images) based on CSV file

What I have and want to achieve: There are thousands of images in one folder. I have a CSV file with following columns: A: original name B: renamed name A typical row looks like this: ...
0
votes
1answer
63 views

Using for loop to create a flexible radio list in a dialog box from a shell script

I want to create a little Program using Dialog to play logfiles created with Script. The problem is that I can't get a dynamic radio list that automatically adds a row if a new logfile is created. So ...
2
votes
1answer
60 views

Is there a command to scan my network and check the conflict IPs

It's hard job to find the duplicate IP when this happens. You know you have then to search all network IPs to check the duplicate. So is there a command line or a script to do that for me?
0
votes
2answers
167 views

How to grab a youtube channel

I always use youtube for getting many information I need. What i want is a script or a command line that grabs and installs all videos from a given channel path. I.e. I want to download all videos ...
6
votes
1answer
239 views

How to run a script when password is entered at the lock screen?

To toggle the enabling/disabling of my notebook's touchpad according to connected USB mouse, I used touchpad-indicator, which runs a daemon to monitor connected devices and take appropriate action. ...
0
votes
2answers
50 views

How to remove redirection unexpected syntax errors

I am loading using Ubuntu for beagleboard-xm sd card partition so after last stage of partition I have entered a command like this ./omap3-mkcard.sh /dev/sdX I have got ti-lab@KILBY:~/angstrom-wrk$ ...
6
votes
2answers
121 views

How to run a script when there is a change in your local IP?

Before marking as a duplicate: this is not about dynamic DNS or similar things. I know how to run a script every time my networks goes up; it is a simple matter of adding a script in the directory ...
3
votes
2answers
56 views

How can I check for apt-get errors in a bash script?

I am writing a bash script to install software and update Ubuntu 12.04. I would like the script to be able to check for apt-get errors especially during apt-get update so that I can include corrective ...
2
votes
3answers
90 views

Create a .desktop file that opens and execute a command in a terminal

I would like to know how to write the Exec command of a .desktop file to open a new terminal and execute a shell script in it. The shell script is working and accessible by all users. When launching ...
1
vote
1answer
1k views

How to uninstall Popcorn-Time installed with a script?

I've installed Popcorn Time using the following command: cd wget https://raw.github.com/hotice/webupd8/master/popcorn-build chmod +x popcorn-build ./popcorn-build that I found here. How can I ...
4
votes
1answer
33 views

Can't login after adding script to /etc/profile.d

I have created a little script to add bookmarks in Nautilus to redirect users to network share. If I run the script manually, it works brillantly but as soon as I try to add it in /etc/profile.d, I ...
3
votes
1answer
43 views

pkill not killing

I have a Script named PirateRadio.py That I am writing a script for. I need to kill and reload the script. Possibly with the same PID. I thought SIGHUP was a sure thing. when i run #pkill -1 ...
1
vote
1answer
35 views

Could I make Automatic Backup Folder For All new files I create or download?

I want to make a folder for all the new files I create , some times I create them at different places (e.g Desktop , Download , Document etc ) The Question Why would I do that ? and The Answer Is ...
5
votes
3answers
184 views

Evaluating a string in shell script

I am following this bash shell scripting guide: http://www.tldp.org/LDP/Bash-Beginners-Guide/html/sect_07_01.html In the section Numeric Comparisons, it cites an example: anny > num=`wc -l ...
1
vote
1answer
29 views

Live CD: Script doens't work correctly after login

I have a PXE/NFS Server (192.168.1.10), a client PC and a diskless PC. I installed base ubuntu to client PC. I wrote this script (update.sh) to work after login to client PC. SERVER=192.168.1.10 echo ...
2
votes
1answer
47 views

Prevent www-data from running scripts and programs

I discovered this little PHP script that allows you to enter GET requests manually from the browser address bar and execute commands. I played around with it and discovered that I could do all kinds ...
0
votes
2answers
34 views

Script to install Ubuntu and same set of programs on several computers

I have several computers at different locations, and I want all of them to be set up in exactly the same way. Is it possible to write a script which I can run once I have installed a new Ubuntu OS to ...