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
2answers
22 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
33 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
36 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
9 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
15 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
26 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
22 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
21 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
votes
0answers
12 views

Namespace Script [closed]

I am looking for a script to create 10 namespaces with 1 HTTP server process each. If any of the 10 HTTP server fails then all the other servers should kill their parent namespaces and stop each ...
1
vote
1answer
27 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
56 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
32 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
72 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
28 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
222 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
58 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
16 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
63 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
66 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
33 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
53 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
69 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
24 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
69 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
114 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
61 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
58 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
165 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
235 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
46 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
55 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
85 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
30 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
39 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
33 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
178 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
46 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 ...
1
vote
1answer
182 views

NDK_ROOT enviroment variable defined but script does not see it

In my ~/.bashrc i have this: export ANDROID_SDK=~/Devel/android_dev_x64/sdk export ANDROID_NDK=~/Devel/android-ndk-r9d export NDK_ROOT=$ANDROID_NDK export ...
1
vote
2answers
39 views

Echo command with color option in script and command works differently

If I run echo -e "\e[1;31mThis is red text\e[0m" in comand line, It prints out red text. However, if I use write it in script file test.sh #! /bin/bash echo -e "\e[1;31mThis is red text\e[0m" run ...
0
votes
0answers
21 views

shell script + mutt: mutt terminating while loop

I am having a problem with mutt exiting my while loop prematurely in my shell script. The while read MAILTO loop of my function sendFiles will only process (send) the first file and then returns. ...
2
votes
1answer
58 views

Run .bash_profile script at login

i'm working on a deb package that allows the administrator to create another account and run that account automatically in kiosk mode. I created the user, specified a shortkey and put that in a hidden ...