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
0answers
10 views

What you want to see in daily server monitoring mail?

I write bash script, which collect information from ubuntu server and send it by mail. With this script you can see: Your clamav antivirus information Which ports are open How many users in your ...
-1
votes
0answers
29 views

Do you think it’s worth it to learn bash scripting in 2015? [on hold]

I really am interested in getting a Linux job, so I started learning bash scripting on my own, but, I did a search recently, and found that a lot of people recommended using Perl or Python, because ...
0
votes
0answers
21 views

the command argument is not passed to /bin/sh in popen

Here is a scenario where I use popen as FILE* stream = popen("Root", "r"); As per my understanding the Root argument will be passed to /bin/sh and interpretation is done. In my case, Root should be ...
0
votes
1answer
25 views

Autostart a Python script in an LX terminal

I have a python script which extracts continuous data from an incoming serial string and inserts the fields into an Sql database. The python script can be run manually from an LX terminal and works ...
0
votes
0answers
10 views

.xinitrc: can't reliably keep caps lock and ESC swapped

I use my .xinitrc file to run the following line: xmodmap /home/eric/.xmodmaprc. .xmodmaprc in turn contains the following: remove Lock = Caps_Lock keysym Escape = Caps_Lock keysym Caps_Lock = Escape ...
0
votes
0answers
16 views

How to run .py scripts with double clikcing [duplicate]

I have scripted a screenshot program with python. My problem is i am supposed to run it from ssh via python filename.py or via ./filename.py command. I gave chmod +x permissions but whenever i ...
1
vote
1answer
20 views

My script only opens new terminals when the previous command's terminal is closed

Sorry if my title is a little hard to understand, I tried to condense the issue as much as possible. I'm trying to run a bash script which opens a new terminal for each major command, that way I can ...
0
votes
1answer
29 views

gsettings not working from within bash function

Pretty New to bash and only 6 months into ubuntu so please bare with me. Im creating a post installation script https://github.com/jjdemitriUk/relutionDev everything is going well so far its written ...
3
votes
3answers
177 views

Sudo command in bash script halts the script

I have an early 2009 iMac with a sensor problem. The ODD and CPU fans run at full speed. To get them down to minimum speed in Ubuntu I need to set the speeds in the Terminal, using this method. Rather ...
2
votes
0answers
20 views

Where do I put a dyndns script for IPv6?

I am using: /sbin/ip -6 addr|grep -v temporary|grep 'scope global'|grep -oE '([0-9a-f]{0,4}:){1,7}[0-9a-f]{1,4}' to grep my global, non-temporary IPv6 address, that is advertised by my router using ...
0
votes
2answers
72 views

Script to find size of image files

I've got image files scattered all around my computer so I'd like to write a script that receives as input a full path to a directory, display the total size of image (.jpg , .jpeg) files in each of ...
0
votes
0answers
35 views

Modify PAM to run script at password fail

Today I've installed Ubuntu 14.04 LTS on my laptop and I decided to get a bit more control on who is doing what while I'm not around. So what I'd like to do is to modify PAM to run a script on ...
2
votes
1answer
146 views

Problem with executing .py script

I am a complete newbie in terms of using Ubuntu and I have stumbled upon this problem: I am trying to run this script: https://gist.github.com/mjkoo/0eb70888b6085b3f65f5 (it's basically a tool that ...
0
votes
1answer
26 views

Installing leiningen, how to move script to ~/bin?

I am trying to install leiningen to an Ubuntu virtual machine. But I am having a very difficult time because of my lack of Ubuntu/linux knowledge. I am specifically stuck on step two of the leiningen ...
1
vote
0answers
24 views

Requirements for KDE startup scripts

I'm running Kubuntu 14.10. I want to include the following startup script for KDE: kstart --desktop 1 firefox kstart --desktop 2 kmail kstart --desktop 3 konsole I placed these three commands in a ...
-2
votes
0answers
15 views

Moodle and php, bash [duplicate]

I write a spesial page in Moodle with buttons, which will be turn on another functions from my programm on server, for example send for spesial user email or anather action. How can i run programm on ...
-1
votes
2answers
53 views

bash comparison of integer always returns true?

I have the following simple bash script. for some reason it always returns true. #!/bin/bash service=hhvm status=($(ps -ef | grep -v grep | grep $service | wc -l)) if [[ $status -eq 0 ]]; then ...
1
vote
0answers
19 views

How to run scripts on screen sleep / wake

I'm wondering how to run a script when the screen times out and when it wakes. I am not talking about hibernate or suspend, but when only the screen turns off. reason is I have a LED keyboard and ...
1
vote
3answers
37 views

gksudo doesn't act like sudo for 'string' >> file [duplicate]

I'm trying to do a two-lines-script to temporary set a specific nameserver. Therefore I just output 'nameserver XXX.XXX.XXX.XXX' to the /etc/resolv.conf file, because it gets overwritten next time ...
-2
votes
1answer
72 views

How to make the “Steam key” on ASUS ROG laptop work

The dedicated steam key on my ASUS ROG G751 laptop does not do anything. What do I need to do to make it launch steam?
4
votes
2answers
429 views

Why isn't this script to delete part of my command history working on my computer?

The script can be found here: http://stackoverflow.com/questions/14750650/how-to-delete-history-of-last-10-commands-in-shell For convenience here it is: for x in `seq $1 $2` do history -d $1 done ...
1
vote
1answer
47 views

QEMU Connect physical disk [closed]

I made a windows virtual machine on my ubuntu pc using the following script (found online). #!/bin/bash configfile=/etc/vfio-pci1.cfg vfiobind() { dev="$1" vendor=$(cat ...
10
votes
2answers
362 views

Re-run an application script when it crashes?

I have some applications that need to run on my laptop all the time. I use a bash script to start these applications. In my script I have a loop that looks similar to this: while true; do ...
1
vote
1answer
19 views

Locate the id of input device and change the value of its property

I learned from this post that you can set mouse speed by the following: $ xinput --set-prop 10 "Device Accel Constant Deceleration" 4 where 10 is the id of the target device, which you can obtain ...
0
votes
2answers
30 views

Best way to schedule script, crontab or other options?

I never use crontab, and while it ask me for root password, I am careful. So my question is, I have to run periodically (let's say every 30 min)a simple script for analyze the text file, which is ...
0
votes
1answer
41 views

Is it possible to use variable in sed command in unix bash script [duplicate]

I trying to solve following problem. With great helps of others here, I can write and understand simple do loop in bash scripting. Now I try to do this: In "mein_directory" directory I need ...
2
votes
1answer
118 views

Alternatives for [variable = string substitution] in bash

I am learning bash and trying to understand the different ways of making a substitution and assigning it to a variable. Specifically, I'm changing Unix slashes ('/') to Windows ('\'). References: ...
1
vote
1answer
47 views

Bash Tab Completion: '-bash: unexpected EOF while looking for matching `)' -bash: syntax error: unexpected end of file

I'm trying to go into an irb session with specific environment variables from a file with this command: $ env $(cat env.sh) irb But when I try press Tab after I type env. to complete it, I get this ...
1
vote
2answers
54 views

how to fix my keyboard after a bash script messed it up

Okay, I was stupid. I ran a bash script I got off of some forum on the internet, github I think it was, that said a cool matrix would appear in the terminal, which did happen, but it also messed up my ...
0
votes
1answer
41 views

Used sudo command that I don't understand, want to undo it

I recently installed Ubuntu 14.04 for the first time, and I've been wrestling with various aspects of it since (mostly successfully), however in attempting to fix and issue with Firefox not playing ...
-2
votes
1answer
29 views

How does this lowercase expression works in bash

I want to convert a vaiable value to lower case. To do this, I am doing following lower_case_var=echo ${var,,} Above expression works fine. However, I am wondering that how it works?
0
votes
1answer
21 views

Is it possible to run a script on keyboard input language change?

I'm interested in running a script whenever I manually change the input language. This is because my xmodmap is forgotten whenever I change input languages, so a solution to that would also be useful. ...
0
votes
0answers
10 views

How can a Nautilus script be run for an empty directory?

I have a Nautilus script that can create multiple directories at once using mkdir with the option -p. The script is effectively the following: directoryStructure="$(zenity --title "make directory ...
1
vote
1answer
45 views

Setting python IDLE as default editor for python scripts

I'm using ubuntu 14.04 LTS and I have installed both python 2.7 and python 3.4 . I have tried everything here How do I set IDLE as the default editor for Python scripts? but its not working. Can ...
2
votes
2answers
81 views

How to rename file names to different encoding?

I have 3 types of file name encodings on reiserfs mounted hard drive: CP1251, KOI-8, UTF-8 and ASCII. I really need to convert all encodings to UTF-8, recursively. Is there any utility, which will ...
2
votes
1answer
89 views

desktop file can t run script in terminal

    I want to make a button on my lxpanel to launch a program that prints out in a pop-up lxterminal “Hello World!”, so I use the technique that I successfully implemented before ...
2
votes
3answers
101 views

Help to create a script to run on system startup

I have an Acer Aspire One 725. Turning it everything is fine except that the touchpad is not automatically activated. I dislike manually activate ... I want the command "sudo psmode" alone is ...
0
votes
1answer
23 views

Short keys to make a line comment in shell script Emacs?

I want to write shell scripts by using Emacs. I have already known to turn shell-script-mode on, but still don't know which short keys to make a line become comment. For example, which short keys in ...
0
votes
2answers
36 views

Bash: Regular Expressions in substitution

I have a bash script to substitute number values inside a text pattern. Suppose I have a file like this: word5word word55word And I want it to look like this: word125word word125word I have this ...
0
votes
1answer
58 views

How to end a cron started script?

I start a script via cron which works fine. But when i then try to end that script via cron (either killall / pkill / pgrep does work) nothing happens. If i let cron try to kill it or try it my own ...
0
votes
1answer
34 views

My bash script only opens editor, why doesn't it run? [duplicate]

I created a script to dd sdb to sdc on my older computer with Ubuntu 13. It ran when I clicked on it – asked if I wanted to run in terminal or edit it. On a newer computer, with Ubuntu 14, I created ...
0
votes
0answers
11 views

Script switch to Audio and HDMI when clicked

I have a pc with the HDMI cable always connected. I need a script to switch audio from HDMI to Analogic audio and viceversa. Can someone help me? :D Thanks
0
votes
1answer
34 views

“Permission denied” when download from script(ruby) file [duplicate]

I want to download a project's dependencies from a script file in tutorial said: run this comment to download ./download-dependencies core my way was like this: $ cd Documents/ImageProccesing/ $ ...
0
votes
0answers
28 views

Change iface when internet is slow bash script

Need help with script that will change eth1 or eth2 ( to auto set different route ). I have eth0 that is shared to lan and two different gateways (routers), one on eth1 and second on eth2. For now ...
2
votes
1answer
33 views

How to Launch Terminal Script with Appliation Icon?

I am relatively new to linux, but I wanted to get my Tor browser up and running. I have downloaded and extracted the Tor Browser Bundle. In order to open the browser I need to cd to the file and run a ...
1
vote
1answer
25 views

How to use Gimp Scripts?

I am interesting in using this gimp scripts When I threw them in my gimp script folder and started gimp version 2.8.10 I could not find any of this filters, So I have a question where can I find ...
1
vote
2answers
41 views

Will “kill -SIGTERM” stop “tail -f”?

Just as the title says, Google gives me nothing and I can't test it on this server. The command as is follows: tail -f <file> | fgrep --line-buffered "string" | sed -u 's/stuff//g' >> ...
0
votes
0answers
42 views

It seems honeyd scripts didn't work?

I have configure honeypot using honeyd, but I couldn't establish any telnet, ftp, http connection on it, although related ports are open : here is the nmap scan from my xp OS which I try to establish ...
0
votes
0answers
47 views

Ubuntu 14.04 Wireless & Wired connection drops out

I noticed that a lot people has the same problem like me , I searched and tried many solutions which askubuntu users&others offered but it didn't work. Here's my wireless script output : ...
0
votes
0answers
11 views

Reliance Auto Login Help

i want to run this script https://github.com/pteek/reliance-auto-login-script but i get this error in lubuntu " Traceback (most recent call last): File "./reliance-login.py", line 27, in ...