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

learn more… | top users | synonyms (1)

1
vote
2answers
2k views

Running local script on a remote machine

I want to run a sript that is present in local machine, but it should perform operations on remote machine. I have already generated public-private keys, so no password authentiaction is required
0
votes
2answers
42 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 ...
1
vote
0answers
29 views

Does anyone know of a Linux tool which converts hyper-v snapshots to full memory dump files?

hyper-v snapshots are comprised of a .vsv file and a .bin file, and I need to convert these in a full memory dump file. I essentially need this tool: http://archive.msdn.microsoft.com/vm2dmp ...
0
votes
2answers
32 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
39 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 ...
15
votes
5answers
24k views

How can I make a script that opens terminal windows and executes commands in them?

I have three scripts I need to run when I start up my Ubuntu machine, they start services I use in my development environment. To do that, I manually open three terminals and type in the commands. ...
1
vote
3answers
731 views

mplayer can't play audio from cron while ncmpcpp is playing simultaneously

I have set up a script, which executes an mplayer command, in order to play audio in crontab. It will be executed in a special set time, but this script can not play audio when ncmpcpp (a front-end ...
11
votes
5answers
14k views

Upstart script doesn't start

Ubuntu 10.04 I have created this upstart script (/etc/init/pure-ftpd.conf): # pure-ftpd - FTP server description "Pure-FTPd server" start on filesystem stop on runlevel S respawn respawn limit ...
1
vote
1answer
64 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 ...
-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 ...
1
vote
1answer
278 views

Can you design buttons on a Ubuntu/Android tablet that is to be used as a virtual keyboard for your desktop?

Running out of buttons After using Autohotkey for remapping, I soon didn't have enough keyboard buttons to attach macros or scripts to them, so I'd have to make new scripts that use the same button. ...
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
17 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
26 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
24 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: ...
-4
votes
5answers
468 views

Can not run script file [closed]

i am new at ubuntu i tried run a file an post_setup.sh from the teriminal by typing: gksu gedit post_setup.sh making it executable does nothing as well, and the apps is called COMODO ...
-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
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
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 ...
3
votes
3answers
4k views

Run a script only at the very first boot

Is there an idiomatic way in Ubuntu to run a script only the first time a machine is booted? (EC2).
0
votes
0answers
33 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
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 ...
8
votes
1answer
6k views

Add lines to cron from script

Is there a way to add lines to a user's cron via script? I usually do it using crontab -e, but I would like to automate this task with a shell script.
4
votes
2answers
232 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 ...
0
votes
0answers
29 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 ...
1
vote
3answers
61 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
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 ...
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. ...
1
vote
1answer
7k views

Run script at boot/startup in Ubuntu 12.04 x64 Server

I am trying to start the RoR application named fedena. What I generally do is SSH login as rootand hit these commands root@cloud:~# cd fedena root@cloud:~/fedena# script/server => Booting WEBrick ...
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
17 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 ...
2
votes
2answers
103 views

Linking bash scripts

Im looking for a way to link some bash scripts. Kinda the way you include php. I wanna have my password.sh ask for pass > launch Utility > Utility checks to see if its correct > if so it will move to ...
2
votes
1answer
2k views

Tomcat Installation startup.sh not working

So I've followed the list of steps on : https://www.digitalocean.com/community/articles/how-to-install-apache-tomcat-on-ubuntu-12-04. When I try to run the startup script, I get this message: ...
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 ...
5
votes
3answers
3k views

Script for opening tabs in Guake terminal

I am using this script with gnome terminal: #!/bin/sh gnome-terminal --tab --title="1" --command="ssh 1" \ --tab --title="2" --command="ssh 2" \ --tab --title="3" --command="ssh 3" \ --tab ...
24
votes
8answers
2k views

How to keep “dot files” under version control?

Etckeeper is a great tool for keeping track of changes to your configuration files in /etc A few key things about it really stand out. It can be used with a wide variety of VCSs: git, mercurial, ...
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
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 ...
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
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
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 ...
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 ...
1
vote
1answer
51 views

How can I control the KDE monitor configuration from a script?

Every morning I come to work, plug in my sleeping laptop into the large monitor on my desk, and then fiddle with this dialog: I imagine that the result of this fiddling is that the "Display ...
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 ...
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 ...
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 ...
2
votes
1answer
59 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?