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

0
votes
0answers
45 views

Running a Python script on an apache2 version 2.4 server

I have a python script (python.py) located in the /var/www/html/Python folder. The script saves some images to another directory (/var/www/html/Data). I have the x file permission on the python.py ...
0
votes
1answer
103 views

How to validate a user's password, with a shell script? [duplicate]

I'm making a bash script for the Ubuntu Terminal. I need to verify the user before the code can continue. How do I ask and validate their existing log-in password?
1
vote
0answers
20 views

xrandr reporting wrong resolution after booting from script started with upstart

I have a script in /home/username/.config/upstart myscript.conf ... description "my startup scripts" start on desktop-start exec ~/scripts/startup.sh start that startup script eventually calls ...
0
votes
1answer
45 views

Concatenate find command with other commans

I am trying to index my file system. What I want to do, is: execute the command find, and for each entry save the last access time, last modified time, compute the hash and other operations. In order ...
0
votes
2answers
44 views

crontab doesn't seem to work and makes different schedule in cron.d!

sudo crontab -e lets me edit the crontab, and I put in this: # Hourly backup 0 * * * * rsnapshot hourly # Daily backup 0 2 * * * rsnapshot daily # Weekly backup 0 4 * * 6 rsnapshot weekly And it ...
0
votes
0answers
18 views

Script to grab file which is downloaded automatically when site is visited

I need a script that would enable me to grab the file that is automatically downloaded when a particular site is visited. I have a PHP script that downloads a file once the link is entered. I need a ...
2
votes
2answers
134 views

How can I show an icon in the panel if (and while) a certain process is running?

I have a script that works in the background. I would like to show an icon in the panel (only) if it runs; it should not show if the script is not running, just like the Dropbox icon. How can I ...
0
votes
0answers
25 views

“Smart” update/upgrade script in bash

I have installed Ubuntu on my sisters computer. I know she will never touch the update icon. So I would like to make a script to perform update. But to disturb as little as possible, there are 2 more ...
1
vote
0answers
122 views

how to automatically copy new files from sd reader to disk on connect?

im new with ubuntu and linux, and poor knowleadge of english, sorry if i cant write clarely. I need a script or something to automatically move new photos (.cr2) from my camera's sd when i put it on ...
0
votes
2answers
42 views

exporting an environment variable from a bash script to a tcsh shell

I run bash scripts from tcsh shells. I want to set an environment variable in the tcsh shell from a bash script. The method of doing this, if your parent shell is bash is to source a file, i.e., ...
0
votes
0answers
47 views

SSH: Torch-Lua Script Unexpectedly Stops

I'm trying to run a Torch-Lua script on the luajit interpreter by using SSH on a remote (Ubuntu 14.04) machine. It runs only for two iterations and displays all the outputs accordingly, but, as soon ...
0
votes
0answers
49 views

How to check ssh tunnel status and create alert

Can anyone please help me to write a shell script checking ssh tunnels status and create alert in case a tunnel dies? Also some log must be created in var/syslog once a tunnel is created or dies. ...
1
vote
1answer
93 views

Command after apt-get install is not executing in script

I wrote a question on Server Fault, but I guess it's more applicable for this community. I'm writing a script which is meant to initially set up my Droplet. In the script, I'm opening SSH connection ...
0
votes
0answers
16 views

Linpack test PBS output

I've downloaded INTEL Linpack test, and I want to run it through PBS script (specifically, run runme_xeon64 file, which contains the given number of tests and their properties). I create file linpack....
0
votes
1answer
42 views

Permission denied when running “./script.sh”, but works when running “bash script.sh” [duplicate]

I've got an issue executing a simple .sh file Here is my example : I'm creating a simple "abc.sh" file for creating a folder echo 'mkdir abc' > abc.sh According the executable bit chmod +x ...
4
votes
1answer
39 views

How To Program A Bash Script That Presses A Certain Combination Of Keys?

Please, i need someone to help me in making a very simple bash script. The job of this script is just to press a certain combination of keys on the keyboard. My objective is to create a script that ...
0
votes
3answers
210 views

How to squash all the contents of a multi-line file onto one line?

I have a file with many thousands (possibly even millions) of lines, however I need all of the contents to be on one line and all spaces removed (there shouldn't be any spaces there, but there might ...
2
votes
5answers
162 views

How to exclude one specific file from being hashed through bash script

I actually try to run recursive through a folder structure and make md5sum on all files into a single md5checksums file. Heres my script: #!/bin/bash rm -f md5checksums find -type f -exec md5sum "{}...
0
votes
1answer
24 views

First Bash Script Problem

I'm completely new to Bash, and I'm trying to make a simple script to automate Git pulling and pushing from a repo, but I can't get it to work. Here is a pastebin of the code: http://pastebin.com/...
0
votes
0answers
18 views

Script no longer running at shutdown

Before having upgraded to Ubuntu 15.10, I was running 14.04, I had a script which remotely backed up the code from my web server, and stored it in a new folder. This worked by running at shutdown, ...
1
vote
1answer
49 views

Help - Command/Script to calculate WiFi speed and save

Hello to all the community Few days ago, I asked the community to help me create a script. #!/bin/bash date=$(date --iso-8601=seconds) printf 'TIME (s)\tSIGNAL STRENGTH (dBm)\t\tTxBITRATE (MBit/s)\...
1
vote
0answers
44 views

Bash script to display XKCD comic - crontab not executing

I wrote a bash script to display the current xkcd comic in my web browser (using the RXKCD package in R). I want to schedule this so that the current xkcd comic displays every morning at 8am when I ...
0
votes
1answer
64 views

Crontab entry to update my xmltv epg - xlm file - Ubuntu 14.04 LTS Server

I have made a small script like this:- #!/bin/sh tv_grab_uk_rt -output /var/www/xml/tv.xml and called it xml.sh. I have saved this script at /usr/bin/xmltvscript/xml.sh I can run this fine with ...
-1
votes
1answer
31 views

Purging custom .deb package through script exits suddenly

I am a developer, who sometime works on deployment related things. I am using Jenkins to auto-deploy my application to an ubuntu 14.04 machine. My application is packaged as .deb and some supporting ...
0
votes
2answers
56 views

Improving bash script

I need to improve this script: nmap -PN -p 9292 -sN 192.68.12.14 | grep "open" I need to check connectivity to ip 192.168.15.24 on port 9292. If the port is open, then print "port 9292 is open" ...
0
votes
1answer
53 views

i need to write a bash script to check a service status and restart

i need to write a bash script to check a service status. I need to look in the command output; /etc/init.d/ipsec status The line "1 tunnels up" indicates the service is up. If the line is not part ...
0
votes
0answers
33 views

Shell script for the following task?

so I have a question for a shell script and since I haven't really worked with it yet I want to ask for help here. My wife currently has to archive loads of screenshots and scans for her work. She ...
-1
votes
2answers
78 views

Joining 2 files and comparing them [closed]

I have two files where I want to use something like a left join that is used in SQL. File1: column1 column2 column3 column4 Ab Cd 100 Us Ef Gh 200 Us File2: ...
0
votes
1answer
51 views

How far can you go with CLI? [closed]

How far can you go with CLI? What sort of tasks can I automate? I would like to create automated scripts for home use for example I open up a terminal enter webbashexecute and then 5 web pages will ...
8
votes
3answers
1k views

Bash Script to Drag and Drop a File to New Location

I'm sure I'll get my ass handed to me for this question, but I just can't seem to figure it out. I'm new to bash scripting, so go easy on me... I want to be able to drag and drop a file onto a ...
1
vote
0answers
44 views

boot script table modified, please contact vendor

I installed Ubuntu and took away Windows 10 from my Lenovo G-50 . Every time I click on suspend the error shows up : boot script table modified, please contact vendor. It just restarts over again ...
0
votes
0answers
18 views

Make mouse automatically click at a color

This thread is totally not made for cheaters. So to be short, I want to make a script that auto-clicks when pointed at a color (like idk in games?) Oh and I also need it to work at full-screen apps (...
0
votes
0answers
27 views

How to run a unix script in Ubuntu14.04? [duplicate]

I am using Ubuntu14.04.2. I am new to linux and ubuntu. I am trying to install a tool (IsoDE; http://dna.engr.uconn.edu/?page_id=517) for RNASeq analyasis in my workstation. I have downloaded and ...
2
votes
1answer
35 views

How to make a daemon which checks if a program is running (at regular intervals) and starts it if it is not? [duplicate]

I am on Ubuntu GNOME 15.10 with GNOME 3.18, but I don't like the normal applications launcher so I have installed Docky, however often Docky suddenly closes and I am forced to manually restart it, so ...
1
vote
2answers
75 views

How to execute PHP code in Linux every 500 milliseconds?

I have an http server on Linux. I have some PHP code that stores variables into the cache using memcache and I would like to execute this code every 500 milliseconds whenever the server is running, ...
0
votes
1answer
60 views

duplicity: problem parsing WebDAV URLs in bash script

I am not a seasoned Ubuntu admin, so please bear with me if I am missing something obvious... Many WebDAV-providers supply usernames as "emailaddress@provider.tld". Although this does not seem to be ...
3
votes
1answer
46 views

How to avoid killing the wrong process in a bash script?

I'm writing a bash script that spawns a couple of child processes, and will be run by a cron job every hour. It's actually running an rsync command to a remote server, and the associated ssh ...
1
vote
0answers
13 views

Start a GUI in NetworkManager if-up.d script

I was wondering if it was possible to start a graphical application from a bash script when my openvpn is up. I was trying with command like this: gksudo -u username "sh -c '(/usr/bin/firefox &) ...
0
votes
0answers
29 views

Run Script on Sleep/Suspend Button instead of going to sleep

As on my machine in my office are running some services (like a server watchdog, etc.) I want to avoid putting my PC to sleep but blanking out the screens when I push the Sleep Button. The Command ...
0
votes
1answer
26 views

I created the file \.sh , am I in trouble?

I had a really bad idea: Curious about what could happen, I wanted to try to use various non-alphanumerical characters as file names. Think may have been a bad idea. I created the a file in the ...
0
votes
1answer
49 views

copying files from multiple directory to another multiple directory

let assume, I have two folders; folder_1 and folder_2. There are another 24 folders in each folder (folder_1 and folder_2). Each sub-folder of folder_1 contains 1 text file whose name is ...
1
vote
2answers
213 views

Get a specific word using awk

I am coding a script to check mysql databases using bash script, I would like to check if the status of a table is not 'OK', will return the table name and do some more actions: check.log table1 ...
0
votes
1answer
33 views

What is causing a script to run when I change to a certain user?

I have a certain user account on a box I'm working on. Whenever I log into or su to that user, a script comes up that restricts my usage of the server. This is intended and I wanted to modify it but ...
3
votes
1answer
101 views

Simple script for monitoring wireless status

I want to create a script that monitors the status of the network (I do not know if there are any programs that already do what I want to do even better). I'm only interested in monitoring the signal ...
2
votes
1answer
67 views

Upstart Script not catching mono application's start or stop

I've used the below script both with and without expect fork. It's purpose is to start a .exe file on start-up, and if it fails, to restart it. The mono application must be started by root/sudo to ...
0
votes
1answer
68 views

Copy files from directory if the name is present in a text file

#!/bin/bash while IFS='' read -r line || [[ -n "$line" ]]; do cd /home/Sud/Minimal\ Packages/All/ if [ -d $line ] then cp $line*.rpm /home/Sud/NewFolder/rpms/ else ...
0
votes
0answers
15 views

Launch a shell script with arguments from Unity “Dash Home” menu [duplicate]

First off, I know about lenses, and am in the process of beginning to write one for this, however this is "lowest hanging fruit" for the interim. My company uses unfuddle to manage tickets (similar ...
1
vote
2answers
54 views

How to store file information into an array?

With this part of script I can get a necessary information about files in my directory(and subdirectories). The only information I need is the extension and the size of file. for file in `find . -...
0
votes
1answer
38 views

How can i get this script working?

The Script(input.sh): echo "What is your name?" if [[ $1 =~ "*" ]] then read name1 read name2 echo "Are you really "$name1 "??? or" $name2 "?" else echo "Are you really "$1 "??? or" $2 "?" fi What ...
0
votes
1answer
1k views

How to Login to ISP Login Page by a Shell Scipt?

I have a ISP that randomly logs me out and my connection gets lost.So i want to write a script that automatically logs me in without user interaction when logged out (which i can test using a ping ...