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)

3
votes
1answer
58 views

Create zip files in /var/www/html using crontabs

As the title explains, I'd need to take a file and put it into a zip archive once a day; also, the zip file has to be moved in /var/www/html, where a .php scripts allow users to download it. Assuming ...
1
vote
0answers
74 views

Bash script: command not found

I have an executable script install_packages.sh in /home/etienne/admin folder. The directory's path is added to $PATH variable from /etc/bash.bashrc. When I type #echo $PATH I see that the variable ...
0
votes
0answers
30 views

An Nmap Script and Crontab

I have created a script that will run an Nmap scan, then go through the results and see what is different from past results. Then email the differences. I have been trying to get it to run ...
0
votes
0answers
42 views

How to install firefox addon Skip Cert Error silently through automation

I want to install firefox addon Skip Cert Error to skip ssl error for my automation projects running on Linux virtual hosts. However, I want this installation of add-on to be unattended through some ...
0
votes
2answers
48 views

when ssh is run with a server + command argument, what startup profile runs if any?

I know /etc/profile and ~/.profile are among the start-up scripts used when ssh is used to login to a server – i. e. using ssh with server argument. However, the scenario where I am just using ssh ...
2
votes
2answers
46 views

Writing script for automatic process

My shell is bash and I need to write a script that runs a specific software for each input data in the several folders. For example: gd2p.pl -i /home/WORKDIR/folder1/input1.o Let's say that I have ...
0
votes
1answer
50 views

Alsa unsupported soundcard

I am fairly new to Ubuntu and could really do with some tips, right here is what I want done Bus 003 Device 005: ID 200c:100a Reloop ^the above is my unsupported sound card listed in #lsusb ( ...
17
votes
2answers
464 views

Using “while read…” in a linux script

Could somebody please explain how the following code works? echo '1 2 3 4 5 6' | while read a b c do echo $c $b $a done` Specifically, I'd like to know why the output of this loop is 3 4 5 6 2 ...
0
votes
1answer
29 views

g++ command not found in sh script

I don't know, maybe this is a duplicate, but I didn't find any help. So, the problem. I have a simple problem - I made a script to automate C++ compiling a bit. Well, there's the script. #!/bin/bash ...
1
vote
1answer
45 views

Error: object “ip” is unknown , try “ip help”

I am trying to run trusted executables through a script. I copied the binary executable /bin/ip to a directory called Tools. I renamed the binary to eip. I have navigated to the directory tools and ...
0
votes
2answers
34 views

Create a dir on scratch with same name as in pwd directory

HI I try to simplify my problem, I'm trying to write a bash script, which can take the actual directory name (just like you get by statement "basename" ) and create a same directory on scratch. ...
0
votes
1answer
208 views

syntax error near unexpected token newline' doctype html ' while installing zpanel

I am new to ubuntu, trying to install zpanel on my VPS server. Found some questions with same problem, but none of them was applicable in my case. I have followed this answer to install zpanel, ...
0
votes
3answers
78 views

How to add executable bash script on ubuntu startup

I have created a executable bash script (using chmod +x) for monitoring my system and it works perfectly with out any error. Now i want to add this script on my start up in order to executing the ...
0
votes
0answers
34 views

sed error Bash script

So here's the deal I'm trying to do some auto editing of a file with sed in a bash script. Here's my code: systemdate=$(date) sudo mkdir "/tmp/autoupdate" sudo echo "$systemdate" > ...
0
votes
1answer
29 views

How to execute a script from trusted shell

I am new to Linux. I have copied the bash program from bin to a thumb drive. I have renamed it to "ebash". Now I connect this thumb drive to other Linux machine. I have mounted this drive and ...
1
vote
1answer
52 views

How to get notified (run script) on every SSH connection?

I'm able to run a script automatically every time I log into my machine via SSH by placing a command in the /etc/ssh/sshrc file. That works perfectly, however it's only triggered when I log in via ...
1
vote
2answers
191 views

awk to compare two files, extract, output to third [closed]

I've written a script in Python, but it's not fast enough for this job. I'm thinking line-by-line processing would work better. I have two files with two columns and potentially hundreds of millions ...
0
votes
1answer
47 views

Packaging bash script with dh-make

I have installed dh-make by installing other packages as recommended by this page which depend on it (I am listing all packages which could have installed it as well because I am not certain which one ...
0
votes
1answer
71 views

shell script for wifi connection via terminal

How to write shell script that will automate interactive steps to connect to wifi via terminal? Steps outlined in How do I connect to a WPA wifi network using the command line? with further details: ...
0
votes
0answers
42 views

Unable to run red.cc file with my tcl script in ns2.35

This is my Tcl script set val(chan) Channel/WirelessChannel set val(prop) Propagation/TwoRayGround set val(netif) Phy/WirelessPhy set val(mac) ...
0
votes
2answers
30 views

Bash “move files” error message

I am trying to move some files based on a search pattern using bash but I get an error message. Here is the borrowed script format I used and the error message. Thanks! #!/bin/bash firstdir=dir1 ...
0
votes
1answer
34 views

How to rebuild my PATH in script?

I have extracted my PATH to a file and listed it as such: /bin /usr/bin /usr/local/bin . /usr/lib/oracle/xe/app/oracle/product/10.2.0/client/bin /usr/java/default/bin /usr/kerberos/bin /usr/local/bin ...
1
vote
2answers
47 views

Script or program to log the disk usage

I would like either a program or more preferably a way to log the disk usage. In order to explain what I mean, when someone installs Ubuntu there are approximately 4.5 GB of disk used. Then when you ...
12
votes
1answer
176 views

Workspace Stopwatch?

Is there a program that can serve as a workspace-depended stopwatch? I'd like to know how much time I've spent in each workspace every day. Edit: I'm using Unity.
1
vote
0answers
33 views

How do I run as bash script from a WebApp?

I currently am developing a custom Ubuntu dist. that runs a dedicated Kiosk app upon boot. I would like an easy method to shutdown from inside the Kiosk app, but I am currently at a standstill at what ...
0
votes
1answer
24 views

Script is not pausing until I type soff

The script is automatically calling the signoff script instead of pausing until I type "soff"? Also a user should not be able to start this script "signon" again while it is running. Below is what I ...
0
votes
1answer
45 views

DHCP on commit script not running

So I have a basic DHCP set up - option subnet-mask 255.255.255.0; option broadcast-address 192.168.0.255; option routers 192.168.0.254; subnet 192.168.0.0 netmask 255.255.0.0 { range 192.168.0.15 ...
2
votes
1answer
15 views

Error in Bucket Brigade script I'm running

The brig start n command should create a bucket brigade of n passer processes in the passer script but when I run this script to begin the process I am getting the following error: ./brig: line 121: ...
0
votes
1answer
30 views

Run a multi-line script in Screen

I want to run this script in a screen: #!/bin/bash while true do java -server -Xms2G -Xmx2G -jar craftbukkit.jar echo "If you want to completely stop the server process now, press Ctrl+C ...
6
votes
2answers
229 views

Total video time in a Directory

Is there a script(bash, python etc.) that outputs the total duration time of all video files in a Directory(recursively) ? For e.g on executing the following : script mypath it gives x ...
0
votes
2answers
117 views

Print second vowel in word in red color

How do I print the second vowel in a word in red or blue color. Let say I execute my script called "script1" which reads a text file. My script should be able to print the second vowel in every word ...
1
vote
1answer
33 views

Using variables as paraments for commands in a bash script

I currently have a bash script which I can simply double click to remote desktop into my institution: #!/bin/bash xfreerdp -f -u myusername -d campus -p mypassword --ignore-certificate website.com ...
7
votes
2answers
228 views

How to use zenity file selection

I am new to zenity and I am trying to make a simple script for loading a file using zenity --file-selection and the wc command to get the word count of that file. I have successfully made a form which ...
1
vote
0answers
40 views

Run a script after every grub-update

I want to run a script automatically after every grub-update. The script itself consists of a single line sed -i 's/[\]"!Windows 2006[\]"/"!Windows 2006"/g' /boot/grub/grub.cfg For this purpose, I ...
-1
votes
1answer
58 views

Display specific characters in specific time from a text file

How can I display a specific number of words or characters in a given time using a loop. Lets say I want to display 120 words in one minute. Here is the loop i have tried: FS=$'\n' for j in `cat ...
9
votes
4answers
412 views

Print output of code in the middle of the screen

The code below will output whatever in file word by word on the screen. For example: Hello will be displayed for 1 second and disappear. Then, the next word in the sentence will appear for a second ...
4
votes
2answers
298 views

Print only one line at a time from text file

how can I print or display only word from a text file at a time. When I run my script it should only display each word from the text file one by one, but only display that word. This is what I have ...
-1
votes
3answers
39 views

Scripting Help to filter out an IP-address

I have a large text file that i want to extract lines of data from, i want to extract every line that contains an IP address that i can specify (z.z.z.z) 2015-02-26 00:00:00 Local3.Info x.x.x.x Feb ...
1
vote
1answer
31 views

How to write a bash completion to complete director names starting at ~/

Imagine I have a bash script called myscript that will only echo it's first argument, which will be a directory name. Example of usage: myscript proj1 Where proj1 is a directory for example located at ...
0
votes
1answer
29 views

How to determine startup run level for Ubuntu?

We are planning to migrate from an older version of Ubuntu to (10.x) to the latest release of Amazon Linux. I'm trying to identify how to replicate the K and S scripts in the rc0.d, rc1.d etc ...
0
votes
3answers
82 views

How to Keep Text Consistent in A Shell Script

Good Day! I am creating a Shell Script so I can then use it to do X (Won't tell) This is my Current Script clear echo Ahmad A Kazi echo IDNO: BD_3456 echo echo Data Clear Program echo c 2015 Ahmad ...
0
votes
0answers
30 views

Update dynamic IP and fail2ban

i have a script running via cron to allow ssh only through some known IP's. Since my Home-IP is dynamically associated i use this script running every 15min: #!/bin/bash ...
0
votes
1answer
50 views

Problem in unmounting a disk image with a script… but not manually!

It is my first experience in writing shell scripts and something curious is happening. I'm working on an embedded system and I wanted my script test5.sh placed in the /root folder of the guest system ...
0
votes
4answers
325 views

bash script which checks input to see if it is “y”, “n” or other - not working

I have written this bash script which is meant to check your input to see if it is y, n or something else (this will be part of a larger project): #!/bin/bash echo "Have you updated the PATH ...
0
votes
1answer
22 views

Scripting question

How do I create a script that asks a user for a file name then creates that file? I have already tried this: #!/bin/bash #Get Script name of this file and create it #Get Author's name of this file ...
0
votes
1answer
59 views

Executable won't execute

I hope that my post is acceptable although I am actually running lubuntu, not ubuntu. I am trying to create an executable file but I am having difficulties. I created a script with a text editor and ...
0
votes
3answers
59 views

Files won't run as programs [duplicate]

After reading an answer on how to make a file run a command in the terminal when ran, I tried to do it myself. I made a new document, entered the following and saved. #! /bin/bash echo "this is a ...
1
vote
1answer
152 views

Copying contents of subdirectories in their parent directories

I have a list of jpeg files in a directory like this (below is just a sample, like the structure is the same but this there are many fo0# sub-folders, not only fo01 and fo02, where each of these ...
0
votes
0answers
58 views

*beginner* > Beowulf cluster > How to run script along with command line in my cluster

I have a Beowulf cluster system with 1 master node and 3 slave nodes having Ubuntu 14.04LTS version. Now I need to improve the cluster performance in the matter of load balancing, latency, bandwidth ...
0
votes
2answers
47 views

replace string in a file with another where both are saved in variables

I want to replace a string found in a file with another string, but both have a special character (in this example it is a . char) e.g 1.0 and 2.0 so this the is command currently used: sed -i ...