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
12 views

Tab Autocomplete “Command Substitution error”

I used to never rely on it, but now that I am hooked, this is driving me nutty. When I am in terminal and hit <tab> to autocomplete my statement, it works for most commands (cd, mv, rm, etc) but ...
2
votes
1answer
16 views

Run script after DHCP acknowledge or after succesful WiFi connection

I would like to register a callback script, which would fire after DHCP acknowledge. Polling is an option... Is it possible at all, without driver/kernel modification?
3
votes
1answer
39 views

How can I minimize windows, only on a specific monitor?

I have monitor and laptop screen and have a problem with the "Show desktop" function. Laptop screen is showing widget that should stay for all the time. Main monitor is used normally. Whenever I use ...
0
votes
0answers
17 views

Boot counter script not working

I'm using Ubuntu 14.04.04 I've written a simple script for storing in a file the number of times the sistem has been turned on and the time and date of the last boot #!/bin/bash file="/$HOME/bootcnt....
1
vote
0answers
28 views

Running Scripts at Startup

I'm trying to run a few scripts (MongoDB and Leanote) at startup but am running into a bit of difficulty. I have a file named leanote in: /etc/init.d/leanote.sh I also ran: update-rc.d leanote.sh ...
1
vote
1answer
14 views

How to run a perl script with arguments

I'm pretty new with Ubuntu and Linux and I need some help in order ton run a perl script. It may sound silly, but I need to run a perl (.pl) file, using a specific argument. The key is that when I run ...
2
votes
1answer
38 views

How to set cursor position with command/script?

I have a script which resets some things, and at the end of it I need it to set the cursor to certain coordinates, either to a custom set or to the centre of the screen (where it is reset to by ...
0
votes
1answer
33 views

Start up script - ubuntu16

I am trying to write a script which will run at startup. Issue is that I am trying to run this as root, on user login. Could someone advise me which is the best way here? I am on ubuntu-16, and I am ...
0
votes
1answer
53 views

Copy all images on system to one folder

Im trying to create a bash script, that will search the system for images jpg, jpeg, png, gif and copy them to a new location. But I'm having a hard time figuring out how to do this. This is what i ...
0
votes
0answers
15 views

How does display a Error/Failure message for a Daemon service starting fail using Systemv init script

I have a USB driver program to detect devices from a particular PID & VID pair, I wrote a SystemV init script for ubuntu 14.04 using default basic init script located inside /etc/init.d/ directory....
0
votes
0answers
24 views

Python … Can't find a usable init.tcl in the following directories: …This probably means that Tcl wasn't installed properly

I need help with my script in python 2.7.6 Lately i'm analizing hdf5 data. But is a large amount of data, like 2 years of measurements, and python don't support it. I need to make a complete time ...
-4
votes
0answers
53 views

Need help with Bash script! [on hold]

I want help to form a bash script as I don't know how to do it? Backgroud information: OS: Ubuntu 16.04 LTS Apps partion mounted through NAS: /apps Both processes shall be runing at anygiven ...
0
votes
1answer
22 views

Cron - Check if enabled on boot

I have a script and configuration file. Configuration file contains information about if script will run or not (enabled or disabled). If enabled, script must run in predetermined intervals. I ...
0
votes
0answers
21 views

PLINK execution of: echo -e “%UNIXPW%\n” ^| sudo -S nginx -t -c, works OK on one, fails on another

My batch file runs a PLINK script in Ubuntu 16.04 LTS, which works correctly on my own VM/Ubuntu. The same command fails in when run on a different VM/ubuntu 16.04 LTS. echo -e "%UNIXPW%\n" ^| sudo -...
1
vote
1answer
91 views

How can I automatically open an url in firefox and click on a specific position on the page?

I'd like to automatically run Firefox on login. Subsequently, I'd like to go to my ISP's page and click on the login button, all done automatically. I do not need to enter the password, since it is ...
0
votes
1answer
36 views

Script to install latest kernel [on hold]

Does anyone know of a script to install the latest mainline Linux kernel from the Ubuntu kernel mainline ppa? Preferably one that auto-runs on login?
0
votes
1answer
19 views

Remotely log into multiple computers and run a python script

I am currently trying to set up network rendering with Blender using computers on different networks. I made a script that launches blender and connects to the host's computer. My problem is that I ...
1
vote
1answer
23 views

Zombie process (kill both child and parent process)

Question: I want to make sure that both child and parent process are killed and echo if successful or not. I'm new on using bash script and having issue with my output. #!/bin/bash for p in $(ps ...
1
vote
1answer
41 views

How to keep DropBox daemon up-to-date?

I use DropBox to sync some files with an online backup I have, all has been going well except for recently I realised that DropBox regularly release updates and my installation does not alert me about ...
1
vote
1answer
15 views

Need bash script output on one line - curl and >> produces 2 lines

I am running this bash script: #!/bin/sh date +"%Y-%m-%d %H:%M:%S " | tr -d 'n' >> /home/test_a5gh/Pub_IP.txt curl http://checkip.amazonaws.com?newline -s >> /home/test_a5gh/Pub_IP.txt ...
0
votes
0answers
53 views

How does SFTP work? Please help someone

We run a system that automatically sends a swift message at the end of a process. But this messages are sent using FTP. We feel the FTP process is too prone to MITMA and wish to change the sending ...
1
vote
1answer
35 views

How to run a function for every specific received packet?

I am doing an experiment for my master thesis. I want to run a function (e.g. multiply two numbers) when a specific packet is received (e.g. a packet with destination TCP port 6666) and then forward ...
0
votes
0answers
23 views

PHP Scripts doesn't executed

I installed LAMP server successfully.But,I didn't have permission to save my php scripts in var/www/html folder.Then I ask it from this forum and fix it. Now what happen is I can save my phps scripts ...
0
votes
2answers
30 views

Are log files written to when a buffer fills or in 'realtime'?

I have a script running which pipes its output through another script; that wrapper script adds a timestamp to each line of the log. However the data is being written to the log file in chunks of ...
0
votes
0answers
26 views

Run script from sublime-text

I have a script that writes public keys on servers that I use. In previous versions of Ubuntu 16.04 I could use it normally. I do not know if it is related to Sublime Text or Ubuntu itself. But today ...
0
votes
0answers
11 views

how to launch ec2 windows instance with boto and add that instance to domain (AD) install web server as well [closed]

how to launch ec2 windows instance with boto and add that instance to domain (AD) install IIS Server as well. Help is appreciated. Regards, -Vijay
-1
votes
1answer
33 views

Rename file under sub-directory in bash [duplicate]

I would like to know how to change the name of a txt file inside a directory. I know that I can mv test123 test456, but that only changes the name in the current directory. What if I want to change ...
1
vote
1answer
33 views

APK versionName grep

Im trying to retrieve the VersionName of a bunch of apk files i have in different folders and store them in an array , but its not working ... I've tried pretty much everything but it only loops 1 ...
0
votes
0answers
49 views

Extract data from logfile from only the previous 24 hours, with bash in a shell script

Using the Ubuntu 14.04 trusty and transmission log for the log file. What is the best way to extract the last 24 hours of log entry's? I have attempted using sed awk grep I cannot seem to get the ...
2
votes
2answers
64 views

STDOUT and STDERR redirection for nc

I am trying to make a watchdog bash script which has to check if the port is open, based on the exit status, otherwise should start the daemon. Problem is I can't manage to avoid the script outputting ...
3
votes
3answers
221 views

How can I give a script its own icon in the Unity launcher?

With Ubuntu 16.04, if you create a launcher (desktop file in ~/.local/share/applications) with a custom icon for a terminal application (so with Terminal=true) then when you start it, it will spawn a ...
3
votes
0answers
44 views

Script on reboot

So, I programmed a simple script to alert on slack whenever the server is rebooted. What I did: In /etc/rc6.d/R99reboot-slack: (I tried with R01reboot-slack) #!/bin/sh /scr/msg.sh "Server restarting.....
3
votes
2answers
63 views

Changing the login shell

If I change my shell with chsh to a shell that I wrote myself, which scripts does it need to execute? I already tried changing to my own shell and surprisingly it worked without an error msg. Now does ...
5
votes
3answers
109 views

Update brightness level depending on the power source on 16.04 LTS

I recently migrated to 64 Bit 16.04 LTS from 32 Bit 14.04 LTS on my Toshiba L645 laptop. In 14.04 LTS system, I had a script that automatically updated the brightness level depending on the power ...
0
votes
1answer
34 views

Run my bash script on login and SEE terminal [duplicate]

i need your help :) I have some script that start on login (I set it on Application launcher preference) but i can't see terminal. One script it's easy and make light on on my CMstorm keyboard and set ...
0
votes
0answers
23 views

Creating A Drag and Drop Bash Script for wipe

WARNING: This question contains dangerous commands. Do not execute these commands on your own computer unless you wish to lose data. I have been using the command like program 'wipe' for ages with ...
0
votes
1answer
33 views

script in shell downloaded by won't execute

I downloaded this file: Renta2015_unix_1_30.sh changed the permission to executable but it won't execute. There seem to be a way to do it in terminal, but it requires the command cd and then the ...
1
vote
3answers
57 views

String Manipulation

var="<string> 1.11 </string>" I want to get rid of <string> and </string> How can I do it? For now i got this: var=${var:9:4} 1.11
0
votes
1answer
28 views

Problem when run script in boot

I created the following script: #!/bin/bash su administrador -c "/home/administrador/scripts/startup_tomcat_hsqldb.sh" I added in /etc/init.d . When I run the command: sudo update-rc.d start-...
0
votes
0answers
15 views

Jar file not coming out of loop in Apache ubuntu

I have set of shell scripts which run in Apache server from cgi-bin. The first script triggers the second, the second triggers the third, and so on. Except on a particular script, say the 10th script.....
-1
votes
0answers
21 views

script nameEror in python to make naver line bot [duplicate]

help this is my problem help my problem please master help me i dont know this script solutions for op in client.longPoll() op_list.append(op) NameEror in client.longPoll
3
votes
1answer
54 views

Why does launching my own script from a launcher only work once?

I created a shell script, let's say it's echo hi sleep 5 echo bye exit Then I created a .desktop -file to launch the shell script. Double-clicking it works perfectly fine: [Desktop Entry] Version=...
1
vote
2answers
55 views

Cron Job doesn't execute

I created a cron job as root with the command: crontab -e Then I added 0 4 24-31 * 4 /home/backupscript.sh after the last line. The output of crontab -e looks like this: # Edit this file to ...
1
vote
1answer
51 views

Creating a bash script [closed]

Alright so, just for a little heads up, I literally just learned what bash script was today. Anyways, I have this series of voice recognition programs wrote in python, and I wanted to make a voice ...
0
votes
1answer
35 views

uninstalling .sh files

I have been run this code sudo ./uninstall.sh in the the directory which I had been install netbeans 8.0.1 and the code runs and the uninstall window opens but it doesn,t uninstall anything.!! Is ...
0
votes
1answer
20 views

Problems understanding how set works

Can someone please help me understand the following code segment? set -- ${BACKUPDIR}/backup-???.tgz lastname=${!#} backupnr=${lastname##*backup-} backupnr=${backupnr%%.*} backupnr=${backupnr//\?/0} ...
0
votes
1answer
40 views

Running a do loop

I am attempting to build a loop to check for files in a folder then run a loop if files exist in the folder and keep running the loop until no more files are left, but I am running into the token ...
1
vote
0answers
28 views

How to open 'Magnet' style torrent links from Firefox in rtorrent?

I am using the commandline torrent client rtorrent under Xenial Xerus and I would like to: Find and click on a 'Magnet' style torrent link with Firefox Have the 'Magnet' link opened automically in ...
3
votes
0answers
31 views

How to run a program in its own, temporary, xdisplay (runx)?

For background I like to play some older games that really run better in super low resolutions and having the whole desktop switch to 320 x 400 is really not that great. I've gotten around this by ...
0
votes
0answers
25 views

how to exclude application/x-executable files in below command

need to add application/x-executable file types in below command. there is no extension for those of files. the only thing i know is the file type is application/x-executable --exclude={.*,*.cbp,*....