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
85 views

Autorun windows share mount script after login as root

I have looked everywhere for a solution that lets me run CIFS automount script after login with around 20 second delay. What I have tried. Added the script to visudo: rait ALL=(ALL) NOPASSWD: ...
1
vote
2answers
130 views

How to install RevKit

I’m trying to install a software called RevKit on Ubuntu 12.10 and the following instructions1 need to be followed: RevKit can be downloaded from the www.revkit.org website. Opening a Bash ...
0
votes
1answer
201 views

.sh installation error, this script is to be run as resolve user

Ubuntu 14.04 64 bit. I downloaded a .sh file that is supposed to install Davinci resolve but when i run it it says uncompressing installation package, and then says this script is supposed to be run ...
23
votes
3answers
1k views

Where should I put my script so that I can run it by a direct command?

Where can (should) I put my (bash) script so that it can be used (forever) by terminal or by a direct command: Alt+F2? I know there is /usr/bin and /sbin & /bindirectories but when should I use ...
1
vote
0answers
42 views

Using a keyboard shortcut to execute a script

Hello I am a linux newbie trying to set up a keyboard shortcut to execute a script I have. The script functions as desired, and is #!/bin/bash livestreamer twitch.tv/arteezy best This opens up ...
0
votes
0answers
72 views

init service script is running twice

I have a init script under /etc/init/ to start up an application server. The problem is that it seems to be running twice. here is the command: exec su - deployer -c 'cd /home/deployer/app/current; ...
0
votes
0answers
17 views

Why is inserted media loaded under user directory? [duplicate]

case in point: I insert an SD card named TESTSD into my computer, It loads to /media/user/TESTSD instead of /media/TESTSD So far this only happened on two installs on different machines with Xubuntu ...
1
vote
0answers
21 views

Automatically detecting and outputing to s-video at startup

After combing the Internet I have developed a script that is capable of checking whether I have a monitor connected to my VGA port and switching to my s-video port if not #!/bin/bash # if no vga then ...
0
votes
1answer
55 views

How to add percent and remained time of download by aria2c via Sysmonitor Indicator?

Is it possible to add download progress bar aria2c/wget to panel, especially the percent and remained time of download by this appindicator or sth else?! I mean when you run aria2c to download a file ...
1
vote
1answer
149 views

Problem with bash script not verifying pid file

The reason I'm doing this script is because I want to deamonize supervisord, right now I'm in a cloud host in which I don't have access to the /etc or the sudo command, this script is my best attempt ...
1
vote
1answer
25 views

Turn off colour while using script(1)

Is there a way to turn off colour while using script(1)? My script file is being filled with unnecessary information regarding colours from commands such as ls. This information is only visible when ...
1
vote
1answer
112 views

Startup & shutdown scripts for Java servers

I am trying to design a graceful startup/shutdown script (Bash) for a Java app (JAR) that I will be deploying to my Ubuntu 14.04 server. I'm looking for a clean, Linux- and Ubuntu-friendly way of ...
1
vote
2answers
47 views

lubuntu how to execute 2 commands in .desktop file?

I have created a .desktop file in /etc/xdg/autostart which runs the command Exec= disper -d LVDS,VGA-0 -r auto -e -t right Now I want to add a second command to run after the first command. How do ...
0
votes
2answers
28 views

Keep backing up (copying) the same file to a new folder

I am saving a stream in my HDD. I'd like to copy the file periodically into a subfolder backup such that the older versions of the the file are not deleted. Simply put Assume the original file is ...
1
vote
0answers
22 views

Detect file size decrease

I am saving streams from browser cache into my home folder. I wrote a script that takes the specific data type and saves them into disk, and names them as data.1, data.2 , data.3 and so on, creating ...
0
votes
1answer
30 views

Shell script backup routers

Below is a script I've wrote to backup my routers and adsl modem, Any ideas to compact this script in less lines? Each router have a different kind of structure as you can see. #!/bin/sh ...
2
votes
1answer
292 views

Open BASH Shell Script files without terminal

How do you run shell script files without using the terminal in Ubuntu? Like just double clicking it. I know in Xubuntu it does it like that but not regular Ubuntu.
5
votes
4answers
1k views

How to know if the running platform is Ubuntu or CentOS with help of a Bash script?

I know the commands to check the name of the Linux machine running on my machine. For example: Ubuntu cat /etc/version CentOS cat /etc/issue How do I get the output from the terminal and ...
-4
votes
2answers
3k views

Whatsapp Help for Ubuntu 14.04! [duplicate]

Hey i have found a way to use Whatsapp on ubuntu using Pidgin! But i don't understand everything on the site... Can someone help me? I have completed the pidgin installation and whatsapp plugin. Now ...
1
vote
1answer
79 views

Copy a file from ubuntu server to a nas drive

I would like to use a script to copy a sql file to a nas drive location. for example it would copy backup.sql to //10.1.1.124/backup/Backups.
0
votes
1answer
45 views

/etc/rc0.d script not allowed to finish

I have a script that I've written that needs to run during shutdown which brings down my vagrant instance. The script runs without issue, and I echo output to stdout (and to a file) of the process. ...
4
votes
2answers
52 views

How can I run a sh script targeting X11-settings on login?

The gui-based controls for mouse acceleration do not suffice to tame my mouse, so I am correcting this by running: xinput set-prop 10 "Device Accel Constant Deceleration" 2.9 This script has the ...
5
votes
1answer
733 views

How to create Excel xlsx files from a script?

I'm looking for packages available in Ubuntu main/universe repositories (14.04) able to create Excel 2007+ xlsx files from a script (python3 or perl) My requirements: 100% compatible Excel XLSX ...
1
vote
1answer
194 views

Bash script doesn't execute command from PATH

I have this simple script: #!/bin/bash echo ${HADOOP_HOME} $(hadoop fs -ls) The output is: /opt/hadoop-0.20.2-cdh3u2 ./hello.sh: line 3: Found: command not found So bash definitely sees ...
2
votes
1answer
168 views

How do I pass complicated shell commands over SSH to be executed remotely? Mine throw syntax errors or get interpreted locally!

I have a command like this which tells me if a system has a disk that's getting full (>=70% full): if [[ -n df -PTh|column -t|awk '{print $6 $7}'|awk -F"%" '{printf "%-9s %-5s\n",$1,$2}'|grep -v -e ...
1
vote
1answer
213 views

GUI toggle key for wifi hotspot(on/off)

I want to create a GUI widget like on/off toggle for running a set of commands. For example, to turn wifi hotspot on and off using ap-hotspot start/stop. Anybody help me...
1
vote
2answers
43 views

Intermittent crontab problem

My crontab entry intermittently fails to find scripts in my user's home directory. The crontab entries run exactly on schedule as specified, and occasionally the script runs correctly, but mostly it ...
0
votes
1answer
44 views

shell script to function on subfolders

I want to write a simple shell script that will go into all the sub-folders in a directory, and organise the files in the sub-folders into new directories. Basically in terminal it would look like: ...
3
votes
1answer
74 views

Bash script callable from home but not scripts directory

I'm having a very weird error when trying to make a script callable. I have a scripts directory in /srv/projectname/scripts where I store you know scripts to be called as cron jobs for different ...
4
votes
3answers
105 views

How to check the number of fields given to the `read` command?

I have a quick question relating to $# in the shell scripts. So, I can use $# at the command line to check the number of a shell script arguments given by the user. Example: # ./shellScript varONE ...
1
vote
1answer
209 views

autogen.sh not found for webkit

I'm trying to install Webkit in ubuntu 12.04 following this instructions: https://help.ubuntu.com/community/WebKit When I get to this instruction: ./autogen.sh --prefix=/usr I got an error ...
1
vote
1answer
73 views

Upstart script doesn't work

I'm trying to create my own script that gets executed on startup and stopped on shutdown (referring to the classic System-V init style), but it won't work! I've created this script ...
0
votes
0answers
32 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 ...
1
vote
1answer
35 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
14 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
522 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
90 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
2answers
174 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
170 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
51 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
26 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
66 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
57 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
320 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 ...
1
vote
2answers
101 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
93 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
75 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
77 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
92 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
50 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 ...