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
vote
0answers
55 views

Running Python script in Abaqus in Ubuntu

I am running a python script through the scripting interface in Abaqus. It's a basic script that writes a value from each element from the abaqus simulation into a a text file. The text file is then ...
1
vote
1answer
36 views

bash script errors in ubuntu 14.04

I wrote a script whilst on ubuntu 12.04.5 which ran through fine however after upgrading to 14.04.2 to fix another issue i am now having issues with the script. It is halting at the first set of ...
0
votes
1answer
38 views

Problem with sudo via ssh

I'm using the following script to execute a update script on a certain number of servers in my network. Here is the part, which I think that is relevant. ### Actual Work ### if [[ $manual == 1 ]]; ...
0
votes
0answers
17 views

Pngquant returns error in Crontab [duplicate]

I have created a small script to compress all the images using pngquant in Ubuntu 14.04. The script is as follows: #!/bin/bash find /home/ghosthut/wp-content/uploads -mtime -2 -iname '*.png' -print0 ...
3
votes
2answers
999 views

What is the difference in running script with ./

What is the difference between running the script by calling directly its name and calling the script by adding a with prefix of './' . I can't find any difference in run time.
1
vote
2answers
85 views

Wait for PID - shown in ps

I am using the command below in a script to wait for a PID and then do something when that process finishes: while ps -p [pid] > /dev/null; do sleep 1; done; [cmd] where [pid] is the PID of the ...
0
votes
1answer
22 views

Cross fading several audio files using sox

I'm trying to cross-fade several audio files together with a 3 second cross-fade and join them together in to one file with sox. I can join several files together by the command below but not sure ...
0
votes
1answer
41 views

bulk image download from piwigo based web gallery

I'd wish to download original sized images from this website, built upon piwigo CM http://mermaid.pink/ Single image download is allowed, but that would take ages Could you suggest me a software, ...
0
votes
0answers
47 views

Join Ubuntu to Windows domain “automatically” not by the user!

I'm working on a project related to image cloning using a FOG solution (to clone an image of Ubuntu 12.04 to target machine using FOG server) We also have an active directory (Windows Server 2008) ...
2
votes
1answer
53 views

How to prevent pdf script code from executing?

Is there a setting inside Ubuntu Default PDF viewer (evince) or Okular to disable embedded script execution in PDF files ? It is a really important setting, that adds an extra security measure ...
0
votes
0answers
45 views

How to take a picture with the isight camera on mac using terminal

I have been trying to take a picture with a small script but I have no idea. All I want it to do is take a picture then show it without opening apps like photo booth. Ps I don't have sudo permission ...
1
vote
1answer
75 views

Bash script to remove item from Nginx cache

I have Nginx running in Ubuntu. I'm trying to write a script that deletes an item from the Nginx cache. Script: clear_single_cache_object.sh #!/bin/bash echo "Deleting: " $1 grep -lr $1 ...
0
votes
0answers
19 views

nfdump schedule with cron

Hi I tried to generate nfdump file with crontab, but whatever the reason it dosent work my script #!/bin/bash nfdump -mR /home/user/test -zw /data/fnf1.dump this script itself works and all other ...
1
vote
2answers
36 views

Undo the “sudo” within a script [duplicate]

Is there any way to undo the sudo within the script? like.. sudo ./script.sh commands 1,2,3,4,5 with sudo rights commands 6,7,8,9 without sudo rights
1
vote
3answers
152 views

How to log access to a specific folder and changes in its contents?

I need to track folder access time, and want to know what changes are made to it. How do I trigger those events? Is there a way to run a specific .sh file when the folder is opened?
0
votes
1answer
24 views

execute script on SSH exit

is it possible to execute an shell script when i'm exiting a SSH session? I want to execute script to disable a service when exiting
0
votes
1answer
61 views

Make shell script default to run file extension

I'm trying to make the default application for .asm file extension to be a shell script that I made. Basically I have a .sh script that runs MIPS Mars and I want to make it the default application to ...
0
votes
1answer
39 views

Sourcing a script from another script fails

I have a script in a file - install.sh - with this content: #!/bin/bash wget https://raw.githubusercontent.com/aspnet/Home/master/kvminstall.sh sh kvminstall.sh source ~/.kre/kvm/kvm.sh Everything ...
0
votes
2answers
64 views

Custom Daily and Weekly Cron Jobs Not Running

I created a script to back up my databases and my websites. It runs fine if I run it straight up but it's not running at all as a cron job. I created a symbolic link to the script: lrwxrwxrwx 1 root ...
9
votes
2answers
143 views

Run only parts of a script as sudo, entering password only once

I am writing a script (actually a combination of scripts and makefile) that installs external dependencies: some apt-get commands, some git cloning, building, installing, adding users to groups, ... ...
0
votes
2answers
49 views

.sh command not working in a desktop launcher

I'm using a desktop launcher to run a.sh script. In a.sh I'm calling another script b.sh using another user using this command sudo -u userB /home/userA/Documents/b.sh. But for some reason it's ...
0
votes
0answers
44 views

Running cron scripts with php and node

I've gone through many posts for cron jobs, but still was unable to run it on my Ubuntu 14.04 environment. I have a file test.sh in /tmp/test/. The test.sh contains several other scripts in PHP and ...
0
votes
2answers
149 views

How to add custom applications/scripts in startup applications in 14.10?

I'm trying to run a script automatically on bootup but am unable to do so because my Ubuntu Gnome 14.10 doesn't have a Startup Applications manager I can't add any custom scripts through running ...
1
vote
1answer
26 views

Awk variable passing question

This is the code I wrote to resolve DNSs and output to a file. Is there a way to forgo the while loop entirely and just write in awk? It works perfectly but it seems very cumbersome and inefficient, ...
1
vote
0answers
27 views

Ubuntu Server 14.04 - won't run bash script file from desktop [duplicate]

I know there are tons of this question on here already but none of them seem to have solved my issue. I've done a clean install of 14.04 Server and install Unity (I know, boss asked for it so he can ...
2
votes
0answers
33 views

How to correctly deploy/install scripts?

I've developed several utility scripts that solve specific problems of my team's day-to-day work. Until now what I have done to deploy the script in my co-workers' laptops is as follows: Every ...
0
votes
2answers
39 views

Whitespace Problems With Script and Variables

I'm trying to beat my head against the syntax of this. I'm getting problems with whitespaces and I can't see if there's a better way to do this. vardir=/home/user cd $vardir for i in $(ls "$vardir") ...
0
votes
0answers
32 views

Adding a file/directory to a specific location (on the Desktop) [duplicate]

I use Ubuntu 14.04.(Unity Desktop Environment) I like to use a specific part of my desktop(the screen) to store files related to my current work, and certain other spaces to store images and others. ...
0
votes
1answer
62 views

Reorganize photos from an existing folder structure into a new structure

This question might have been asked before, but I am not sure I use the right keywords to find it. I have a directory of photo's, that were (re-) organized before, into a directory structure: ...
0
votes
1answer
26 views

Runlevel 0 script not running properly on shutdown

I have a basic script where all it does is delete a specific user on shutdown. I made it executable and created a symlink to /etc/rc0.d/K99deleteuser so that it would actually run on shutdown. ...
1
vote
2answers
71 views

How to delete files selected by rules?

I have a large list of .mp4 files in one directory on a NAS(Network Attached Storage). Some are listed as follows : XXXXX_3800.mp4 and other like XXXXX_8000.mp4 XXXXX is the same for both ...
2
votes
1answer
817 views

shell script for connect server through ssh terminal?

How to write shell script for connect multiple server through ssh terminal. Its should open multiple tab in terminal and connect multiple servers through ssh ex ssh test@192.168.2.1 ssh ...
0
votes
1answer
54 views

Ubuntu 14.04 Remote shutdown teamviewer or php script

when I try to remotely shutdown with teamviewer my Ubuntu 14:04 pc turns off uncompletely because of the teamviewer team advice appear on the desktop (wine supported). I solved by running the coomand ...
0
votes
2answers
35 views

Message indicator after specific time?

Is there any tool this can indicate message after each 30 minutes of uptime ? actually I spend too many time on computer so i want tool which indicate message after every 30 minutes. like, when ...
0
votes
2answers
49 views

network manager - run script when connect failed [duplicate]

is it possible to tell network manager to run a script when network connection gets down (and it can't reconnect)? e,g: I have A bug in my network card driver, and sometimes NM fails to connect, a ...
0
votes
0answers
86 views

Make Install error FBReader - execvp Permission denied make[1]: [do_install] Error 127

Make install error . While i make install in the root mode it says this. make[1]: execvp: ./scripts/install_help.sh: Permission denied make[1]: *** [do_install] Error 127 i changed the path of ...
2
votes
1answer
54 views

Can simple scripts use GUI file manager to select file?

I have an extremely simple script that currently executes a command on a file located in the same folder: command ./file_in_folder option output. It would be better if script asks user which file they ...
0
votes
1answer
45 views

Network scanning script - cronification issues

This is (yet) another query about cron. I have referred to the guide on this site before posting here, but I still can't get this script to work. It is designed to suspend the PC when activity on ...
5
votes
2answers
389 views

Move multiple files to a dir if their names contain the same string present in dir name

I have multiple files in one folder: ABA.xy BEB.xy ACA.xy The same files with different extension in another folder ABA.rr BEB.rr ACA.rr Then I have single folder for each file name ABA BEB ACA ...
1
vote
0answers
47 views

Ubuntu 12.04 LTS scripts in /if-up.d not executed

Since this morning have been trying to achieve something: System: Ubuntu 12.04 LTS, Network-Manager is not installed Goal: Every time, the eth0 network interface is started (if-up.d) we want to ...
0
votes
1answer
18 views

Implementing an if clause in simple bash script

I've got a bash script that makes use of cal -m $v where v is number . The user is prompted for v's value at the beginning of the execution . In case the user presses ENTER instead of introducing a ...
0
votes
2answers
51 views

How to run a tcl program/script [duplicate]

I have a small tcl script which I am trying to run. I have changed the permissions to allow execution of the script (although it did require sudo access to do so?) checking the Ubuntu Software Centre, ...
0
votes
1answer
26 views

A problem when invoking a function in a bash script

I've written the following bash script to find a driver's name, I'd make it better but for now I just want to know why this script doesn't work ? #! /bin/bash ## the driver's name ...
0
votes
1answer
23 views

A bash scripting problem

In advance , I'd say I know the basic syntax of bash scripts but the following statement is not recognized for me : if [ ! -f /etc/debian_version ] could you help me what this condition going to ...
0
votes
0answers
84 views

how do i achieve executing a python script ON TERMINAL via a shell script in nautilus folder by the right-click>Script way?

Using nautilus i am writing a script which will run the python script which invoked it. So to run a python script i just need to right-click on it>goto scripts>select appropriate script and it will ...
0
votes
1answer
77 views

Why isn't Roundcube's Upgrade Shell Script Working?

I am trying to upgrade my Roundcube installation from version 1.0.4 to 1.0.5 and I cannot get the upgrade script working properly. According to Roundcube's upgrade documentation, the following command ...
0
votes
2answers
59 views

bash script dollar sign operator $ question - is it incompatible to ~ operand?

I am new to the Linux environment. After a quick search I could not find a helpful question about the $ operator used in bash scripting. I do not know if this question relates more to the Ubuntu (or ...
0
votes
1answer
22 views

Creating a script involving the memory usage of processes

How can one create a bash script that displays the sum of memory usage for the processes which have PID<100?
0
votes
0answers
49 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
125 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 ...