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
1answer
13 views

Hadoop: Not able to find the start-dfs.sh start-mapred.sh scripts

I have installed Hadoop by following this tutorial. I installed it using ppa. When I reached step 12 : Starting Hadoop Cluster. I got stuck. When I do cd ~/tasdik/hadoop/bin/ It says no such ...
0
votes
1answer
32 views

Script wont print my echo statement (Also need to suppress the warning)

I am trying to write a very simple shell script in Linux. The Scenario I am trying to achieve is: Creating an user account and giving it a password internally (No interaction with user allowed for ...
3
votes
2answers
69 views

How to stock all files with the same suffix into a table?

i'm making a little shell script and i want to stock all files with same suffix in a table. i want something like that : path=/home/user/Documents suffix="_suffix.txt" and then a function that ...
6
votes
1answer
4k views

How to create Excel xlsx files from a script?

I'm looking for packages available in Ubuntu main/universe repositories able to create Excel 2007+ xlsx files from a script (python3 or perl) My requirements: 100% compatible Excel XLSX files. ...
37
votes
2answers
68k views

How to add a shell script to launcher as shortcut [duplicate]

Possible Duplicate: How can I edit/create new launcher items in Unity by hand? How can I create launchers on my desktop? I want to add some shell scripts in my launcher as shortcuts.. ...
1
vote
3answers
55 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 ...
4
votes
4answers
7k views

Run a script only at the very first boot

Is there an idiomatic way in Ubuntu to run a script only the first time a machine is booted? (EC2).
0
votes
1answer
28 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, ...
1
vote
0answers
28 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
24 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
32 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
890 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.
5
votes
2answers
1k views

Enabling unattended-upgrades from a shell script

I have a shell script to automatically configure new Ubuntu virtual machines for my purposes. I would like this script to install and enable unattended-upgrades, but I cannot figure out how to do so ...
0
votes
1answer
17 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 ...
1
vote
2answers
70 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
0answers
28 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) ...
1
vote
1answer
50 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 ...
2
votes
0answers
31 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 ...
1
vote
3answers
139 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
0answers
19 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 ...
30
votes
6answers
27k views

Beep in shell script not working?

I'd like to use a beep sound in a shell script. Unfortunately none of the methods I found via Google work for me. I tried echo -e '\a' echo -ne '\007' and the command beep after I installed it ...
3
votes
1answer
3k views

How to set system-wide proxy address using shell script?

I want to set system Proxy address through my Qt application. So i was wondering if i could write a script which can be executed by my application every time to change the proxy address. I tried : ...
0
votes
0answers
16 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
33 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
2
votes
1answer
8k views

Tomcat Installation startup.sh not working

So I've followed the list of steps on : https://www.digitalocean.com/community/articles/how-to-install-apache-tomcat-on-ubuntu-12-04. When I try to run the startup script, I get this message: ...
7
votes
5answers
4k views

How to compare two files

So basically what I want to do is compare two file by line by column 2. How could I accomplish this? File_1.txt: User1 US User2 US User3 US File_2.txt: User1 US User2 US User3 NG Output_File: ...
1
vote
3answers
14k views

Bash - 'if' statement: compare two strings

I would like to make a script that deletes a directory with rmdir after confirming with a password using read to set the variable. So far I have this: #!/bin/bash -x echo "Password:" read -t 30 S1 ...
0
votes
1answer
11 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
0answers
18 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
30 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 ...
49
votes
2answers
16k views

What is the difference between “source” and “.” in bash?

As the question says, what is the difference between executing a script with source command and with . , i.e.: source /some/script and . /some/script
9
votes
2answers
115 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
46 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 ...
0
votes
2answers
33 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
26 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
1answer
69 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 ...
2
votes
0answers
29 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 ...
1
vote
1answer
23 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
26 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 ...
-3
votes
0answers
24 views

how i can show the proccess running in ubuntu without using ps and top command?

I want to write a script which show output as PS command give. That means without using PS and top command I want to display running process on terminal. please help me. Thanks in advance
0
votes
2answers
35 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") ...
1
vote
2answers
67 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 ...
0
votes
1answer
54 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: ...
2
votes
1answer
8k views

How to uninstall Popcorn-Time installed with a script?

I've installed Popcorn Time using the following command: cd wget https://raw.github.com/hotice/webupd8/master/popcorn-build chmod +x popcorn-build ./popcorn-build that I found here. How can I ...
0
votes
0answers
31 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. ...
2
votes
1answer
40 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 ...
1
vote
2answers
804 views

Cannot run bash script from crontab when it works from command line bash

I have a strange problem of being to able to run a bash script from commandline but not from the crontab entry for root. I am running Ubuntu 12.04. * * * * 1-5 root ...
0
votes
1answer
16 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. ...
2
votes
1answer
397 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 ...