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)

3
votes
2answers
33 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
9 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
13 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
8 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
37 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 ...
3
votes
1answer
41 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 ...
4
votes
1answer
26 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
40 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
21 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
35 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
31 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
45 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
114 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
36 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
38 views

how to create my own command on shell Scripting [closed]

can you tell me how to create a new commnand on shell Scripting? thank you
0
votes
1answer
19 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
28 views

no echo in bash shell script loop

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
117 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
17 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
49 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
77 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
24 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
23 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 ...
0
votes
1answer
41 views

error in running bash script as root

I have a simple shutdown script which i want to run as root shutdown -h +30; echo "succesfull"; I have followed these answer1,2 to make my script root. first I run this command sudo chown ...
0
votes
1answer
31 views

How to maintain a counter across multiple executions of a script?

I have a script with a conditional statement and I want to find out how many times the then clause is executed, across multiple runs of the same script. eg: if [condition] then Some code; ...
0
votes
1answer
24 views

How to schedule a script to be run as soon as the system is booted?

My laptop's touchpad doesn't work unless I enter the following commands in the terminal: sudo modprobe -r psmouse sudo modprobe psmouse proto=imps I could do this everytime I log in, but I want to ...
1
vote
2answers
22 views

Calling Values from a .properties file?

Right now I have a simple script I want to now call a .properties file and then print the results of that file, this is what I have so far #Specific Set Variables SpecficStatus="Pass" #SetVariable ...
2
votes
2answers
66 views

How to monitor the status of shutdown sequence

This is the script I made to lock and shutdown my system after 30 minutes. #!/bin/bash # Read Password read -s -p "Password: " password echo # shutdown and screensaver Command echo "$password" | sudo ...
0
votes
1answer
48 views

How to change display's position from command line?

How can I use the command prompt to do get the setup shown below? Edit: I need the secondary display to be located to the left and half-way to the top of the primary display, as shown above. The ...
0
votes
0answers
14 views

Gui/Script to set up Wifi at login?

Wondering if anyone has tried setting something like this up before. I'm planning on shipping a product that runs ubuntu, and it will strictly need to be wifi only. I am wondering if there is a ...
0
votes
1answer
28 views

How do I find out why I get anytime the same error message from an original Ubuntu script?

Swap2Ram.sh always produces its error message, even when I have enough ram left. Any ideas? #!/bin/sh mem=$(free | awk '/Mem:/ {print $4}') swap=$(free | awk '/Swap:/ {print $3}') if [ $mem -lt ...
1
vote
0answers
17 views

Screen in crontab

I'm trying to run 9 screens windows by crontab, and then, run some codes (basically the same for all of them), but they don't work. The code runs all of 9 screens, but run code only on the first. Aah, ...
3
votes
2answers
66 views

How to execute a shutdown with timer and screensaver command in a script

I made this script when executed will shutdown my system (after some time) and should enable a screensaver. #!/bin/bash sudo shutdown -h +30 gnome-screensaver-command -a There are mainly two ...
0
votes
0answers
18 views

Enable Vino Script Help

I have been trying to add and enable Vino to our districts Ubuntu laptops but have come up with some issues that I can seems to find a solution to and i was wondering if you might be able to assist. ...
-1
votes
2answers
25 views

Startup Command

i would like to run this command after my network has been established when i boot up my ubuntu. the command in the terminal is : "mavproxy.py --master=/dev/ttyACM0 --baudrate=57600 --out=myipaddress ...
0
votes
1answer
31 views

Execute scripts and Java programs from apache/PHP

I'm trying to allow apache and PHP to execute a script I have written that is located in /usr/local/lib the script in question is called "pathy" has been added to the path in my .profile, and I can ...
1
vote
4answers
31 views

What other ways to install ubuntu without using a flashdrive?

Curious about the other methods out there to install the operating system, Ubuntu. Thanks.
0
votes
1answer
20 views

Does a user creating text file need to be in a specific place?

I've got several scripts which wont work for me but work for others. Their purpose is to add users to the system, and then assign them to groups. I wrote it as a nano bash file; does it need to be ...
2
votes
1answer
66 views

How to make a batch file add users to groups?

I need help with a GCSE project, I'm stuck on the last question. It asks for a bash script to create users, and then assign them to groups. I've already made the script add new users, but I'm unsure ...
1
vote
2answers
36 views

Creating a terminal from a shell script in Ubuntu

What is the name of the executable for the Ubuntu Terminal program? I want to launch a terminal from within another terminal. For example inside an XTerm I can write: xterm& How do you do ...
2
votes
1answer
76 views

Stacking multiple for in commands

I'm operating on large amounts of data, and have a protocol involving several scripts. I launch it separately for each input file, simply swapping filename in text file containing the command. I would ...
0
votes
0answers
40 views

Copy standard output to file

Script 1 uses echo (and other commands) to standard output. Script 1 also runs other scripts, which also use echo (and other commands) to standard output. Script 1 is called by a scheduler that ...
-1
votes
0answers
23 views

How to display the 'percentage free' RAM usage using Perl Script? [duplicate]

I need to make a perl script which will display the percentage free RAM usage and the value should be able to be piped to another command. Appending into a text file should also be possible within the ...
0
votes
1answer
51 views

How to create a perl script which checks the system stats(CPU,RAM,HDD) and sends an alert mail? [closed]

The script is for adding to the cron tab. The flow of the shell script should be like this. 1. Checks the CPU state. 2. Checks the RAM usage. 3. Checks the HDD usage. 4.Sends an alert mail to ...
2
votes
2answers
85 views

How can I find windows of a specific application and place them into a grid?

I'm trying to write a script to identify all open chrome windows and move them into a grid layout on a large screen I'm not sure how to find out what the best resolutions would be so I was going to ...
2
votes
1answer
51 views

Using awk command in perl script [closed]

Can somebody suggest how to use piping of commands in a perl script? Specifically commands that involve calling awk? I'm trying to create a perl script that will read disk usage using df -H and ...
3
votes
1answer
30 views

Replacing string in a file

I wrote the following command: rpl -x'.txt' '0 ' '-1 ' /home/administrator/temp/myText.txt However I get an error message: Usage: rpl [options] old_string new_string target_file(s) rpl: error: no ...
4
votes
3answers
84 views

How I can monitor new files in a directory and move/rename them into another directory?

A program generates output textfiles, named output.txt, after every 15th iteration of a certain process. Doing so, it overwrites the last output.txt. I want to keep the files however, and I can't ...
0
votes
0answers
17 views

How do I remove a MATE panel applet from the terminal?

I want to be able to script a setup of a MATE desktop environment. I want to be able to add and remove applets without the GUI. Specifically, I'd like to be able to remove the workspace switcher.
4
votes
2answers
63 views

Why my bash-script doesn't work with cron?

I created a bash script to automatically update my Ubuntu Server. Here is the script: #!/bin/bash apt-get update apt-get upgrade echo "Update am $(date "+%d. %m. %y|%H:%M:%S) >> ...