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 (3)

5
votes
2answers
120 views

Is there a software that periodically lets me do mental arithmetic exercises?

I am aware of my lazy nature and need to push myself towards doing some basic mental arithmetic from time to time. Therefore, I am looking for a software that periodically asks me to do a short mental ...
3
votes
2answers
162 views

sudo: ./abc.sh: command not found

Commands typed in terminal: chmod 777 abc.sh sudo ./abc.sh Every shell program is giving the same error: .sh: command not found Including this simple abc.sh program: #!/bin/bash # My first ...
0
votes
2answers
51 views

find all '&' characters in files and folders

i have a Ubuntu server with samba file sharing. i want to find all files and folders that have '&' in their name an replace it with 'and'. can any one help me on this situation. thank you all i ...
2
votes
2answers
32 views

Script to copy files to folders with the same shared template names

Can anyone help me to define a script which would copy multiple files one by one to multiple folders in other destination based on their shared template names? For example I have several folders ...
1
vote
1answer
13 views

Synchronization schedule

I have two computers connected to the same home network. I would like to synchronize certain folders between the two. In the past I already used unison for this purpose and I think this could be a ...
0
votes
0answers
26 views

Conditional shell script execution on NAS

I've got NAS, more specifically QNAP TS-251 running Ubuntu (but kind of modified one - it doesn't have terminal). Since none on QNAP forum was able to answer me, I've decided to create a post here. ...
0
votes
0answers
20 views

How can I make a script wait for the XServer before running?

I have created the following script: #!/bin/bash   exec 3>&1 4>&2 trap 'exec 2>&4 1>&3' 0 1 2 3 exec 1>/home/diet/1_auto_update_script.log 2>&1 ...
0
votes
1answer
16 views

no permission to run -rwxrwxrwx 1 tux tux 19 Jan 23 12:46 idea_tmp_check.sh file

I try to get IntelliJ running. It complains that it can't run idea_tmp_check.sh file. I changed the permissions to 777 -rwxrwxrwx 1 tux tux 19 Jan 23 12:46 idea_tmp_check.sh Trying to run it from ...
3
votes
2answers
42 views

Logging script output to a file

I wrote a simple script to monitor my gpu clocks and temps. I wanted it to, aside from being visible on the terminal, log its output on an external file. How could I achieve this? My script below, for ...
1
vote
0answers
62 views

Creating an upstart service for dumping and uploading a mysql database on shutdown

I am running Ubuntu Server 14.04 LTS x64. I have two KVM guests. One is a file server and another runs mysql server. I have a script that I run on the file server. The script connects via ssh to the ...
1
vote
1answer
39 views

User home folder size limit

I am trying to find anything on the web no success. Is there any way to limit size of home directory for user ? Or any directory ? The best would be by percentage for two users 45% and 45%. But by ...
1
vote
2answers
99 views

Add a multi-line text with one variable to multiple files using bash

I want to create a script that puts a multi-line text as a header in multiple files with txt extension. But the text to be inserted also includes the name of the file in which it will be inserted. ...
-1
votes
0answers
45 views

Copy multiple folder and overwrite

i have two folders: /test1/film1/filmnew.mkv /test1/film2 /test1/film3 /test2/film1/filmold.mkv /test2/film4 /test2/film5 Now i want to copy all folders from test1 to test2. If the folder not ...
0
votes
0answers
28 views

Use cURL to download file through multiple ips

I'm new to Linux (I use Ubuntu). We have download speed restrictions per local IP (250 kbps), however our ISP offers 150mbps bandwidth. I have assigned multiple local IPs to my NIC. My goals are: ...
0
votes
2answers
24 views

Execute sudo command (openvt) with global shortcut

My goal here is to run the cmatrix script and lock the desktop simultaneously, so that cmatrix will be shown as a screensaver until I come back and unlock the computer. My script looks like this: ...
1
vote
0answers
30 views

Are there any basic templating preprocessors that I can use for nginx configuration files?

I've been using nginx variables to simplify my templates for a few years now. It turns out this is apparently a "rather slow" way of doing things and that my static configuration should be static. ...
0
votes
0answers
9 views

How to prevent launcher flashing after clicking it and before a window opens or timeout?

When I click a Unity launcher icon, it will flash until a window opens or until a timeout is reached. Also the mouse cursor changes to the spinning circle. While it is flashing, further clicks on the ...
4
votes
3answers
184 views

How to start or kill tasks when the core temperatures goes above/below a specific value?

I would like to write a short script that gets launched manually once and then should: run a command if all temperatures are below x °C. pause the command if any temperature rises above y °C. ...
-1
votes
0answers
37 views

How to perform SCP using Chef automation tool?

I want to copy a "tar" file (JAVA tar ball) from Chef Workstation to Chef Node. How can I achieve that? I tried with these block of Ruby scripts (default.rb) but its of no use 1. excecute ...
0
votes
1answer
20 views

crontab java process information

I try to get a bash script running that should output the java process information to a file. Unfortunately when I add it to the crontab -e the script is not executed. As user root the script is ...
-1
votes
2answers
54 views

How can I use “find” in shell scripts to search from current directory and most importantly subdirectories?

My script does work, but the script only searches its current directory. I would like my script to search for a file in the subdirectories. This is what I have so far. #!/bin/bash read -p "file ...
0
votes
0answers
18 views

Change the theme of Burg, from the command line?

How can I change the theme for burg without using the burg-emu or grub-customizer? I am just looking for a command to change the set theme for burg, I want to configure it on a new install from a ...
1
vote
1answer
21 views

need help with script options in terminal/bash

I'm fairly new to scripting (self teacher), but not clueless. im trying to make and easy installer script for a program version set, and am running into some difficulties. here is a modified version ...
-1
votes
0answers
26 views

How can I send email with attachment xls file using shell script as application/xls mimetype without making the received file becoming unreadable

#!/bin/bash ATTACH1=file.xls SUBJECT="lucky day" FROM=me@domain.com TO=you@domain.com CC=them@domain.com MIME="Application/vnd.ms-excel" FILE=$ATTACH1 ...
1
vote
1answer
27 views

Why can not the Bash script file run by shortcut get the content of a file?

I have a script that starts a new activity for hamster (activity tracker). This is my current script: ACTIVITY=`zenity --entry --title "Enter new activity name" --text "New activity name:"` hamster ...
-1
votes
1answer
34 views

Why am I able to execute a file which has just read permission? [duplicate]

I am able to execute a file which has just read permission: nkrish@maddev2:~$ ls -l NewFile.sh -r--r--r-- 1 nkrish nkrish 14 2016-01-14 12:01 NewFile.sh sh NewFile.sh .. File gets run... ...
0
votes
0answers
18 views

Need some advice with a script for anacron

I made a bash script and I made it by using gedit as sudo. Let's call it "script.sh". Then I made the script executable. I've already tested it. It does run, but with sudo. Inside the script I didn't ...
0
votes
1answer
30 views

Catching intruder

I work in a company where is better to not forget locking your pc before leaving it, because the first person who finds it's unlocked will use all his strength to embarrass me on social networks and ...
-1
votes
0answers
18 views

why cron is running my script in parallel mode

I am trying to run a script using cron. when I run it in normal way (./myscript) it is doing it in the right way. When I run it with cron (./myscript | at now) the instruction are not executed in ...
0
votes
1answer
27 views

Why a folder needs a execute permission when I'm trying to execute a .sh? [duplicate]

I've got a folder that has 0600 chmod permission and this folder has a sh script. I'm trying to limit some permissions but I've realized that if the folder has not a execute permission, unless for ...
0
votes
1answer
71 views

Script in /etc/init.d/ does not run in Ubuntu 15.10

I have a script which simply echos current time and appends the output to a file. Below is the bash script. #!/bin/bash #Filename: /etc/init.d/bootlog #Bash script to record a timestamp. echo "Time: ...
-2
votes
2answers
98 views

Why does my terminal look like this?

When I maximize the terminal, the display becomes like this and text won't expand to entire screen. All the content/text is only visible on top left side of the window while it's maximized. All the ...
1
vote
1answer
35 views

How to get an alert when my input volume is turned on and turn it off if I so desire?

As you can tell by the name, I am an extra paranoid Panda and in order to keep my bamboo safe I don't want my input volume to be on just in case if I get some spyware which listens to my sound input. ...
4
votes
2answers
461 views

How to find all empty files and folders in a specific directory including files which just look empty but are not?

Let's say that in my folder ~/list I have a large amount of folders each with their own sub-folders and sub-sub-folders etc, and there are lots of files almost on each level. However some of these ...
1
vote
0answers
22 views

init: Failed to spawn telnetd main process: unable to execute: No such file or directory

kernel: [ 43.208320] init: Failed to spawn telnetd main process: unable to execute: No such file or directory I get this message several times at start up on Ubuntu 14.04. telnetd is a script which ...
5
votes
1answer
50 views

A sleep script for Ubuntu server

Let's start from the beginning: I have a Pi which wakes up my server when a request comes in on tcpdump, and it works like a treat! My problem is that I want my server to sleep when there is no ...
0
votes
2answers
41 views

Find and Replace with Bash

I'm trying to replace some text with other text in a configuration file. I created a script with the sed command but I'm getting an error. Original Line: <property ...
0
votes
0answers
32 views

Shutter custom filename fails when called from script

I'm having some trouble with Shutter, I don't know if my shell or shutter is guilty of such behavior. I can call shutter from command line successfully : shutter -e -s -o '/tmp/screen_%NNN.png' ...
0
votes
1answer
79 views

How do I add custom items to the context menu in Dolphin in KDE 5?

I've Googled around, but can't seem to find any consistent tutorials or documentation that describe how to do this (in my case, on Kubuntu 15.10). I want to add custom scripts to the context menu in ...
0
votes
1answer
30 views

shell script to move a set up folders into one folder and timestamp it

I have a set of folders (let's assume at /home/20161, /home/20162, /home/20163) which have been timestamped already. at the end of the day, I'd like to collect all of them and move to a main ...
3
votes
1answer
53 views

Script to copy files with desired name

I've got a problem i'm facing for 6-7 hours and i can't overcome it , that's why i'm asking for your help.I need to create a bash script that accesses a folder and renames all the files from it with a ...
1
vote
3answers
286 views

Somehow I created a nondeterministic sh script

I created the following script: #!bin/bash cat > Top10 <<EOF Linux Mint 17.2 Ubuntu 15.10 Debian GNU/Linux 8.2 Mageria 5 Fedora 23 openSUSE Leap 42.1 Arch Linux CentOS 7.2-1511 PCLinuxOS ...
3
votes
3answers
55 views

How can I reorganize files by extension, and sort them into folders by category?

Below code was posted by @JacobVlijm. I've tried to modify it, because I want other folder names then the file extensions, and I'd like to group file extensions into categories. The code does not work ...
1
vote
0answers
14 views

Update apache/admin password in multpile folder

This is great work very well done. I have a problem too it is requested that you inform me how can do this. Let say i have folders named Folder1/apache/users/admin Folder2/apache/users/admin ...
0
votes
0answers
12 views

Detached process dies with terminal [duplicate]

I wrote a script to get around a problem with the volume indicator on my ubuntu mate 15.10 system (pulse audio sometimes doesn't start, not a clue why, but it will start after a try or two). I have a ...
2
votes
2answers
115 views

How can I easily scale a screenshot, taken from a high-DPI screen?

Since I switched to a High DPI display, the screenshots I post are awkwardly big, example below. Is there a way to quickly make them look normal? Preferably something faster than firing up GIMP. In ...
0
votes
0answers
33 views

Number patter counter needed in Python

I have a ultrasonic senor when entered this script (it’s a bit too long to past it in here) I get lots of numbers printed out (every 1 seconds). These numbers are between 0cm to 700cm, however ...
1
vote
1answer
42 views

script not working

I'm very new to linux, I'm trying to get names of .ogg files from a text file and take mp3 files of directory music and rename and move them to a different directory with the name of that file line by ...
0
votes
0answers
8 views

Need to access old EXT4 boot drive as a R/W EXT4 from new EXT4 boot system

Installed 12.02 some years ago on EXT4 platform. Over time lost audio and alt+ctrl+t doesn’t open text screen any longer. Upgraded to 14.04.2 and system boots OS but no repairs were made. Have set ...
1
vote
2answers
40 views

Pass Variable Value as Argument to Command

I want to let xdotool type the current date automatically and wrote this bash script as a first try: #!/bin/bash STR="Hello World!" xdotool type $STR Unfortunately, it already fails at ...