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)

1
vote
0answers
31 views

bash script: gnome-terminal does not parse arguments

Using 14.04. I read several posts here and changed the command; however gnome-terminal comes with an error: Failed to parse arguments: Cannot open display: I have a bash script in which several ...
0
votes
1answer
69 views

run script after xserver started

I have a script which I would love to run after xserver has started. This file is located at /home/karl/.scripts/startup/sensei-raw-startup.sh. How to I invoke this file after xserver has started?
0
votes
1answer
33 views

[Edited/include]man: bash. \e and bash shell “enter” token

This is kind of a 2 part question and you'll understand why when done reading. To start, I was trying to figure how to cause an "enter" action inputted into standard output so that the script can ...
0
votes
1answer
69 views

Upstart not running .sh script

The information on the web regarding upstart, init and .conf files is rubbish. A lot of different places show completely different ways of doing things. Anyways, I have a script file ...
2
votes
2answers
122 views

Run script on login (script with sudo) or startup

#!/bin/bash ids=$(xinput list | awk '/SteelSeries Sensei Raw Gaming Mouse .*pointer/ {print $8}' | sed 's/id=\(.*\)/\1/') if [ -z "$ids" ]; then exit 0; fi read -a ids_array <<< $ids ...
1
vote
1answer
23 views

where to put shell script for rsync?

I am doing rsync backups of our samba shares with a shell script. I wonder what is the best practice about where to actually store such a script? Currently it's residing in the /home of my admin user. ...
0
votes
3answers
74 views

How to compare two strings (from user input) in a bash script

Here comes my script, i know i'm doing something wrong so please help me! #!/bin/bash # Description of the script echo "Enter first word " read test1 echo "Enter second word " read test2 cmp $test1 ...
0
votes
1answer
45 views

How to write a script that does collectstatic for django

I want to do an automatic collectstatic script for my django application. I tried various things but it did not work. My last attempt is to call an expect script within a normal script: ...
0
votes
1answer
38 views

How to do more with an expect script than just a log in

I have an expect script that logs into my Beaglebone: #!/usr/bin/expect -f spawn ssh debian@192.168.7.2 expect "debian@192.168.7.2's password:" send "temppwd\r" interact ...
1
vote
1answer
41 views

Disabling Guest account bash script

Hey I'm working on this all purpose script to tighten a ubuntu computers security and one of the things in it is to disable guest account through lightdm.conf. The way my script is setup or at least I ...
1
vote
2answers
48 views

Running “dpkg -s” or “-l” silent

I am writing a script that checks for a very big list of dependencies. So I wrote a function that gets the package name as input and using dpkg checks if it is installed and prints an appropriate ...
4
votes
2answers
150 views

Upstart process listed as stop/waiting

I have this upstart script When I run: sudo start poxa it starts the process but when I run: initctl list it shows me that is is stop/waiting but when I check ps aux | grep poxa it show the process. ...
1
vote
1answer
20 views

how to trigger an action when a window is opened

I want to develop an script that it is able to detect when a window (by its name) is opened and, send an email (or any other action). How must I proceed? I've read about skx/Pkie but I am not sure ...
1
vote
3answers
46 views

How can i make a selfstarting script [duplicate]

I have an TL-WN727N wireless adapter connected to my laptop. Every time I start my laptop I must manually enter those two commands in a terminal: echo 'install rt2800usb modprobe --ignore-install ...
0
votes
0answers
40 views

Script to Receive Email Notification in Ubuntu 14.04 When System Shuts Down and Boots up

I am using Ubuntu 14.04. I want to write a shell script to get an email notification whenever my system shuts down and boots up. Please help me out. I have tried the below link but with no luck. ...
0
votes
1answer
22 views

Recover overwritten terminal log output

I accidentally overwrote the log output of the terminal. What i did was script logfile commands exit and then i accidentally overwrote the file as: script logfile
1
vote
1answer
38 views

Save apt- dependencies to text-file

I would like to save the list with dependencies for installed programs into a text-file. The reason I would like to do that is for example if I am to install a meta-package, which in turn would rely ...
0
votes
0answers
27 views

How to install dogtail script recorder in ubuntu 14?

According to this tutorial, https://wiki.ubuntu.com/Testing/Automation/DogtailTutorial I should have 'Dogtail script recorder' installed in my system after install python-dogtail package. ...
0
votes
2answers
51 views

How to make a command execute once a certain command terminates?

What I want to do: Whenever the apt-get install command is run and terminates, run another command immediately without any involvement on the user's part. In my case I want to run a script, but since ...
1
vote
0answers
48 views

Need Help Getting Script to Run At Boot (Ubuntu 14.04 LTS Headless)

I've searched everywhere and done my homework before posting, but still can't get one thing to work. I have an Ubunutu 14.04 server (headless) and am trying to figure out what I'd think would be a ...
2
votes
0answers
44 views

Cannot run make - Bash vs Dash

I am on Ubuntu 14.04. 64 bit. I have a C++ source code with a makefile. As per the provider of the code, all I am supposed to do is to go to root directory for the code and type make, which is ...
0
votes
1answer
48 views

writing starting from a certain line number with loop

echo -n "which names (lower case only)?" read name let assume inputs are: brmu ankr ista I need to write specific lines after the 20th lines in text file w.r.t. user inputs with one space from the ...
1
vote
3answers
288 views

How to execute commands in gnuplot using shell script?

What I want to do is write a script which first launches a program and then tells it to execute a bunch of commands and then quit. Lets go with an example. I wrote this script myscript.sh and it ...
1
vote
1answer
46 views

How to run the following command in Ubuntu and which path it is referring to?

Following is my set of script that I need to run but I am not sure about the path it is referring to ? and should I put the whole script in .sh file and then run, or something else to execute the node ...
4
votes
1answer
138 views

Search files content for possible BTC key strings

I have 4 BTC addresses on two of my drives that I cant bloody find. I saved them under stupid name so they would be hard to find if someone had access to my system. Now I cant find them. Is there a ...
3
votes
2answers
29 views

Run 1 function of bash script

Is it possible to run only a part of the bash script on startup of ubuntu server? if so how can I achieve this?
1
vote
2answers
102 views

run .py files in python?

I have a file called ikfast_generator_cpp.py in a directory called openrave-0.9.0-src/python under my home directory. How do I run it in Python?
1
vote
2answers
31 views

Program not working, any help please?

my program is suppose to print out files that are readable and writable, print out the amount of files (that are readable and writable), print out the total amount of files and finally list all files ...
1
vote
6answers
654 views

Create a file and write to it using a python script? Without using the open() function? [closed]

Is it possible to do the above without using the os module or the open() function? How can I create a file and write to it, with the above conditions, using Python? Also, could you provide an ...
1
vote
0answers
32 views

Making ruby script into .exe

Is there a way to make a windows executable from a ruby script on Ubuntu ? I've tried to achive that with ocra gem but I constantly getting this error : ...
0
votes
1answer
75 views

resolution issue and issue running a manual .sh file

I am new to Ubuntu, and my original problem was with the resolution. I am running Ubuntu 15.10 (x64) on a VMWare Workstation 12.0.1 which is on a Windows 7 Enterprise x64 machine with AMD Radeon HD ...
0
votes
2answers
56 views

how to write a script that runs on the beaglebone

I was wondering how can I write a script that execute commands on the beaglebone. my script looks like this: ssh debian@192.168.7.2 mkdir folder1/ mkdir folder2/folder3 but it always stops after ...
0
votes
1answer
127 views

running bash script on server to execute multiple MATLAB scripts

I'm not a programmer, just a chemist. I'm writing a bash script, which I want to run on the server and expect it to do the following: Open a terminal Loop over folders slave_1, slave_2, ..., slave_N ...
0
votes
0answers
87 views

How to run SASM Assembly IDE on Ubuntu?

I have downloaded SASM Assembly IDE for Ubuntu from here: https://build.opensuse.org/package/binaries/home:Dman95/SASM?repository=xUbuntu_15.04 but after extracting I cannot see any script which I ...
2
votes
3answers
173 views

Hauppauge 610 Analog Video Capture Script or Command

I have Xubuntu 14.04. The camcorder I am using is the Sony CCD-TRV16 NTSC 180x Digital Zoom. I am using the Hauppauge 610 USB-Live 2 Analog Video Digitizer and Video Capture Device to convert 8mm ...
0
votes
1answer
48 views

How do i transcode all files in a directory with ffmpeg

I am wanting to make a script to transcode all the lossless files from my camera to 3mb/s and change the codec to h.264. I found a command that will export the files as one big file but i want ...
0
votes
3answers
82 views

Run a Script with Bash

I have a script from the book Data Science at Command Line, Jeroen Janssens like this curl -s http://www.gutenberg.org/cache/epub/76/pg76.txt | tr '[:upper:]' '[:lower:]' | grep -oE '\w+' | sort | ...
18
votes
5answers
581 views

Add and remove update channels in an easy terminal way

I know there is a GUI in Ubuntu Software & Updates to enable the update channels updates proposed backports security as shown in this screenshot: I am looking for an easy way to do this ...
-1
votes
1answer
23 views

Help Debugging a shell script

I am trying to create a script to do the following: Lists each directory included in the PATH environment variable Report if directory exists or not var=${PATH //:/''} for d in *; do if [ -d "$var" ...
1
vote
1answer
75 views

How to add a python script as a terminal command? [duplicate]

Lets say I have a script which creates a file and writes something into it (but could be anything). It could be a script that runs a set of xrandr commands to set a resolution, for example. Is there ...
2
votes
3answers
285 views

run script on startup

Currently I am looking for a solution to run a script upon start up, not login, start up. I have been researching this specifically for Synergy, but with the new version of Ubuntu (15.10) the ...
0
votes
1answer
73 views

`zip` works in shell but not in Python script

According to this post I'm calling the zip command using os.system() in Python. At the command line it works: zip -r /Backups/backups/20152011-120209{.zip,} When I call this from a Python script ...
1
vote
1answer
57 views

How to do something only once, ever

I am writing a script that downloads some files and executes them. I only want each filename executed once by the hosts that are downloading them. I am trying to create a script that pulls the ...
0
votes
0answers
44 views

How to plug and play/unload and load a hidraw device/module such as touchscreen automatically

I've bought a cheap touchscreen (lcd LS-7T) for my project but when I attach it to my computer (it's a NUC - intel) system fails to load it as a hidraw device and I have to plug and play it every time ...
3
votes
2answers
62 views

How can i format output from an aliased command (`weather EPWR`)?

I've created an alias in ~/.bashrc, which executes weather EPWR which gives me current weather informations in the following form: jjj:~$ do-I-need-a-jacket Searching via station... [caching result ...
0
votes
1answer
43 views

Trying to convert a simple C program into an AWK program [closed]

Hey guys a couple of weeks ago I wrote a C program that prompts the user for the name of a text file and then prompts the user for a word. The program then outputs the input text file with numbers to ...
3
votes
1answer
69 views

Open new 'gnome-terminal' window with specific PS1 variable

I'm pretty new to Linux, so thanks for taking the time to look at this. I'm simply trying to configure a script to open several new terminals, which works. The problem is that I would like to also ...
0
votes
0answers
8 views

DNS Configuration Package(s)

We have slave DNS servers that use configurations that have been manually added to each of them. So that we can easily reconfigure the salves, these configurations should be converted into a package ...
-2
votes
1answer
56 views

automate adduser and add to group in one shell scrpit [closed]

So i am looking for a quick and easy way to auto mate adduser and at the same time add that user that you are creating to a group. I have tried many way of writing in shell scrpit and it has not ...
-1
votes
1answer
55 views

Problem in concatenating 3 strings in bash script

I want to concatenate 3 strings in a bash script file. #!/bin/sh v1="aaaaaa" v2="bbbb"$v1 v3=$v2"cc" echo $v2 echo $v3 Result: bbbbaaaaaa ccbbaaaaaa As you can see, 3rd string appears at the ...