Script is series of instructions written in plain text file. The script interpreter (i.e. shell, Python, Ruby, etc.) can read this file and act on the instructions as if they were typed at the command prompt. The interpreter also provides a variety of useful programming features to make your scripts ...

learn more… | top users | synonyms (1)

-1
votes
2answers
36 views

How to copy an executing script from current folder to another by double click

How should we copy an executing script from one folder to the another? The script content is: #!/bin/sh zenity --forms --title="Add Friend" \ --text="Enter information about your friend." \ ...
0
votes
1answer
43 views

Help Creating Rsync/Crontab script that checks if ExtHD is mounted before running

I have a toshiba 3tb ExtHD and it consistently gets unmounted if I say shutdown computer then turn it on to a live cd then reboot back into OS. Its a simple fix, all I do is unplug and re-plug the USB ...
-1
votes
2answers
51 views

Strange behaviors in adding integers from Python script [closed]

This python script is adding the sums of the numbers entered in a single line delimited by space except that it is not adding correctly. Thanks in advance. Print "Enter Numbers:" ...
3
votes
1answer
200 views

How to check if two or more programs are installed using a bash script?

I want to check whether two or more programs are installed using a bash script: hash foo &> /dev/null if [ $? -eq 1 ]; then echo >&2 "foo not found." else echo "foo found" fi ...
0
votes
0answers
26 views

Execute jar file when user mount a loop block device linux

I successfully created and mounted a loop block device using these commands. dd if=/dev/zero of=my_fs bs=1024 count=30720 losetup /dev/loop0 my_fs mount -t ext3 /dev/loop0 ...
0
votes
2answers
116 views

Environment Variable seems to be set yet not working

I use Ubuntu 14.10 with bash shell. I downloaded a gradle distribution and moved it to a new directory. I want to permanently set a environment variable to point to the bin sub-directory of the ...
0
votes
0answers
44 views

Failing desktop notification from script

I am running an APC UPS for my home VOIP equipment. My Ubuntu 14.04 LTS computer with apsupsd is also plugged into this UPS, and I have modified apcupsd's onbattery script to shutdown the computer 1 ...
0
votes
1answer
31 views

How to backup and reinsert .bashrc-like files with post-install script?

I have my proudly written .bashrc and .bash-aliases files. Sometimes, I edit them. More often, I reinstall the whole system. What is the best and simplest way to preserve content of files (for ...
0
votes
1answer
35 views

Bash script to log all recent apt-get installs and locations

Sorry if something like this already exists, but in my research I found no evidence that it did. what I want: a "monitor" type script that I can write, that I would "activate" prior to apt-get ...
0
votes
1answer
82 views

Hiding terminal when executing zenity bash script by double click

Is there a way to hide terminal when a bash script for zenity is executed eg: szAnswer=$(zenity --entry --text "where are you?" --entry-text "at home"); echo $szAnswer I want to hide the terminal ...
1
vote
3answers
49 views

Rename directory using a variable

I have a directory that contains thousands of sub-directories. Structure like this: Dirs: 1 2 30 109 I want to rename all the directories by adding 10000 to their current name. E.g. Dirs: ...
1
vote
0answers
28 views

rsync multiple IP's using bash script?

I am trying to use rsync to synchronise remote files with local server. It works great but I want to do it on multiple remote servers to sync with on daily basis. sshpass -p "xyz" rsync -avz ...
3
votes
3answers
94 views

Bash program to open files on a second monitor

I've written a little script in bash that opens a file and then five minutes later closes it. It repeats this procedure on and on. The problem is that whereever the mouse is pointed the program ...
2
votes
1answer
39 views

How do you copy something to the clipboard when running a script triggered by incron?

I've got a script that works perfectly when I run it as myself on the command line but when the script is run by incron the line that copies a value to the clipboard doesn't work. Basically I'm using ...
0
votes
0answers
24 views

cron script issue when sending mail to multiple recipients

I have a script to generate reports every morning and mail it out to multiple teams. Since I want to make the script generic (there are many reports) I added the following in each script- ### Mailing ...
0
votes
1answer
25 views

Issues Installing a Tool Set

I am working on a research project that requires me to utilize data from NASA's Fermi Large Area Telescope. NASA provides users with a package of tools to manipulate and utilize the data they'd be ...
7
votes
3answers
395 views

Display the current date & time in the window's title

Is it currently/technically possible to display the current date & time (ie: digital clock numbers) to the currently active window? Like appending some text from a script?
3
votes
2answers
112 views

Is there a way to autostart CPULIMIT in order to reduce excessive CPU consumption

tracker-miner-f, tracker-store, tracker-extract and dropbox processes are killing my CPU, they make it run at over 100%, overheating my laptop. I have installed CPULIMIT and it works great ...
1
vote
0answers
30 views

Permission change after moving file? [duplicate]

I want to run a bash script in a directory /media/aliakbar/New Volume(internal drive)/further/path/to/file . The problem is: with chmod +x the file's permission is not changed (proof: I couldn't ...
1
vote
1answer
146 views

I keep getting bad substitution error on bash scripts with arrays

I've been working on a Bash script using an array. I keep getting this message, "Bad substitution". So I Googled the problem and every example I came up with supposedly works but not on my computer. ...
0
votes
2answers
34 views

I need to change Gamma to .8 on startup

I added the command sudo xgamma -gamma .8 to rc.local in order to change the gamma on startup but its not changing it: #!/bin/sh -e # # rc.local # # This script is executed at the end of each ...
0
votes
1answer
22 views

Expand mouse-wheel volume control to whole panel

There is one application I missed back from Windows and it is Volumouse. Simple yet effective app which enables you to control volume from the whole taskbar (panel) not just from indicator icon. ...
-1
votes
2answers
57 views

BASH text editing [closed]

Currently working on a project where I need to edit the text on a bunch of nearly identical spots. Basically, I need to turn this 30 SCF Done Ti 52.3941 48.0198 49.5622 Ti 49.4797 49.061 ...
0
votes
1answer
51 views

Why did my nemo scripts disappeared?

If you are using the Nemo file manager from the "WebUpD8" PPA (https://launchpad.net/~webupd8team/+archive/ubuntu/nemo) you might have noticed that you cannot launch your custom scripts any more. The ...
2
votes
1answer
102 views

Find and Rename recursively in folders, subfolders and multiple files

I'm new with shellscript and I'm having some problems trying to do what I need... I want to 'optimize' all my *.png images and found this so I made the bash as it says with: #!/bin/bash pngnq ...
1
vote
3answers
89 views

Bash shell for loop process with two paired variable names

It's common to use bash shell for example to bulk rename plenty files. Usually I used the following structure, for file in ./*.short do # do command done That's for filename with .short extension. ...
3
votes
1answer
77 views

Execute Script when Android Phone is connected to specified/selected USB Port

I´m having some trouble with my udev rule. At the moment, I had my udev rule setup to execute a script whenever a Android phone is connected to any USB port on the computer. But I don´t want the ...
1
vote
0answers
19 views

How to configure ccsm from the command line or a script?

THE GENERAL PROBLEM: I wish to change some settings of ccsm from the command line, or more precisely a script. I imagine there will be some arcane combination of gsettings or gconftool that does what ...
3
votes
2answers
58 views

Script Remove All hardlinks for a specific file

I want to delete all hardlinks for a specific file. The usage would be script somefile, this would count the hardlinks for the file somefile, then it's going to delete all hardlinks keeping this ...
1
vote
0answers
11 views

How to track the Internet connectivity of two PCs simultaneously using a script?

I have two PCs and I want to monitor the Internet connectivity in both of them and make it available in a page (not local, and something like example.com/statuses) as to whether they're currently ...
0
votes
1answer
31 views

Chromium app closes after executing the bash script by double click

I have a chromium app which i want to execute from a bash script. I am successfully able to execute this command from terminal and able to open the app but when i tried to double click the script the ...
0
votes
0answers
31 views

live555ProxyServer as daemon service

I would like to make live555ProxyServer as a daemon service which would start each time my pc reboots. How do I properly implement start and stop in init.d script file? This is what I have right now ...
3
votes
1answer
49 views

How to search for files through hashsums

I search for files often in my files system by either using the tree command and grep, or the find command, but recently I downloaded some content from a site, but forgot where I saved it, now I know ...
5
votes
1answer
133 views

Run script when monitor is connected

I am trying to run a script located in usr/local/bin/ when I connect an external monitor to my laptop. I have tried to add a new udev rule but that did not work. I created a new file in ...
5
votes
1answer
67 views

Use the bang-commands (e.g. '!!') of bash in scripts and aliases?

Is it possible to use the so-called bang-commands (! + command/symbol, like e.g. !! or !$:p) in bash scripts and in bash aliases? I wanted to add the line alias getit='sudo apt-get install !!' to ...
1
vote
0answers
91 views

Script with xdotool not working properly on a fresh reboot

I want to run streamus (chrome app) to stream youtube from terminal and asked a question relating to that in this same SE. I also got a wonderful answer and a script for my problem. But that script ...
1
vote
0answers
34 views

Error Setting up Minecraft-init Script

I run a Ubunut 14.04 64Bit Server and try to get a vanilla Minecraft server to run as a Service. I found a good script here: http://minecraft.gamepedia.com/Tutorials/Server_startup_script I set it ...
2
votes
2answers
48 views

Lock individual application's interface

Can I lock a particular application's interface without locking the whole screen? It would be very useful at work to be able to leave certain applications open when leaving my desk as colleagues often ...
1
vote
1answer
39 views

How to prompt the execution of a custom script after a task has been completed

I have created a script called checkrest and I have placed it with executable rights in the /bin directory. The script checks if a restart is required by an application, and if so, it checks which ...
0
votes
2answers
79 views

Difference between C programs and shell scripts receiving signals from fuser

I have written the shell script below for a lab in my college. It must look at a log file being upgraded frequently from another process and create a number of copies passed at invokation. Here is the ...
1
vote
2answers
139 views

Script to spread each file to its associated directory

The scenario is: I have a directory with thousands of pictures in the format YYYYMMDDXXX YYYY: stands for year MM: stands for month DD: stands for day XXX: stands for an ID of the picture, it ranges ...
0
votes
0answers
37 views

shell script in /etc/profile.d not running at startup [duplicate]

I have a shell script at /etc/profile.d/pg_local.sh. It contains the following contents: export PATH="$PATH:/usr/local/pgsql/bin" Its supposed to load that path in the user accounts' $PATH when the ...
0
votes
1answer
23 views

discover if other users are executing the watch command on the machine in which MyOwnCommand is beeing executed

I want to know if there are other users that are running watch on the same machine in which command X is being executed. How can I do that?
0
votes
1answer
54 views

Bash script with loop does not echo

In this script, the second echo statement doesn't do anything. #!/bin/bash echo "Start folder create..." find . -name "*.zip" | while read filename; do foldername="${filename%.*}"; mkdir -p ...
2
votes
1answer
266 views

Shell script with select command to show a list of files

I've written the attached bstls.sh shell script which uses the command select to choose the subfolder or file in a folder passed as argument on which execute the ls command. #! /bin/bash #Personal ...
0
votes
1answer
43 views

OpenNMS installation fails with error, Apt-Get broken

I was installing OpenNMS and during the install it fails with following error Preparing to unpack .../slpd_1.2.1-9_amd64.deb ... Stopping OpenSLP server: slpd. Unpacking slpd (1.2.1-9) over (1.2.1-9) ...
0
votes
0answers
72 views

How to add and pass system password as a variable in a script

I have a script which asks for system/login password and pass that password to further processing. This is the gist of programm by which I am executing my script. read -s -p "Password: " password1 ...
4
votes
1answer
110 views

How to execute a sudo script with double click

I have this script to shutdown my system after 30 seconds. I want to run this script by double clicking it (that option I changed in nautilus). This is the content of my script #!/bin/bash shutdown ...
2
votes
0answers
44 views

error insserv with script

I try to install Unbound with the following website: http://www.unix-tutorials.com/go.php?id=3681 I copied the script : #!/bin/sh # # unbound This shell script takes care of starting and ...
0
votes
1answer
62 views

scripts in if-up.d not executed when ppp connection is created

I have a simple script "test" in /etc/network/if-up.d directory. The script contains below commands. It creates a empty text file, whenever an interfaces changes state from down to up. #!/bin/bash ...