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)

0
votes
0answers
11 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
7 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
23 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
31 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
0answers
16 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
21 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
27 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 ...
1
vote
1answer
9 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
24 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 ...
5
votes
2answers
128 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 ...
-3
votes
0answers
29 views

Print second vowel using provided loop!

FS=$'\n' for j in `cat $1`; do #Reads the text file in the centre of the screen echo " ___________________" echo " ...
0
votes
2answers
69 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
19 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 ...
5
votes
2answers
131 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
29 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
42 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 ...
8
votes
4answers
336 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
183 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
36 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
24 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
21 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
2answers
47 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
19 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
39 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
263 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
15 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
40 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
44 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
127 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
33 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
37 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 ...
1
vote
2answers
27 views

Splitting a string not working

I'm trying to split a string but there is something wrong. If anyone could please advise. echo -e "\e[41m## i = $i ##\e[0m" str1=$i | cut -d'/' -f1 echo -e "\e[41m## str1 = $str1 ##\e[0m" and ...
1
vote
1answer
36 views

How to execute a number of lines using xargs

I have a large sql dump that has 1 insert statement per line. I want to be able to pipe this to xargs so that I can slow down the writes. Basically I want to execute a number of lines, sleep, then ...
1
vote
1answer
37 views

shell script not working properly

I'm writing the below script but it seems not to work as this is the output: ## entered first loop ## [==1.0]: command not found [==2.0]: command not found ## entered first loop ## [==1.0]: command ...
0
votes
1answer
51 views

Making a Bash script to set desktop wallpaper as animated gif — what do these errors mean?

I was following this tutorial to see if I could make my desktop wallpaper in Ubuntu into an animated gif. In the tutorial, I copy and pasted a script that would supposedly allow me to do this. ...
0
votes
2answers
54 views

New to Linux: troubleshooting help with Ubuntu 14.04 issues

I am new to Linux and I'm having several issues with my version of Ubuntu 14.04LTS 64-bit. computer info: ASUS x200m touchscreen 11.6" original os: windows 8 current os: ubuntu 14.04lts 64-bit I ...
1
vote
0answers
43 views

bash script to cd into an USB device

i am creating a simple updater for a program which will be ran on an Odroid C1 with Ubuntu 14.04 Server.. Preamble 1) i want the updater.run downloaded from my server and placed into an USB; then ...
0
votes
0answers
15 views

Simple shell script for iPerf [duplicate]

We have an Ubuntu network in our test lab, and run traffic using iPerf. I want to automate the process a bit by writing out a script that would run the following from a terminal: iperf -s -u -P 0 -i ...
0
votes
0answers
21 views

system actions based on keywords in logs

I've been searching for an answer for some time but haven't come up with much. I'm wondering if there is a way to monitor logs in Ubuntu and then launch scripts based on keywords and/or input lines ...
3
votes
1answer
145 views

Bash script, arithmetic with floating point variables / strings that represent them

I'm trying to create a simple script that takes an average load percentage of the CPU each minute. I'm doing this by using the sar command from the sysstat package. Here is my current code: ...
0
votes
0answers
44 views

How to execute script as root during login of specific user?

In my specific case I need to log out user using sudo pkill -KILL -u <username> command and I tried by adding it to .profile and .bash_login but it doesn't seems to work and I couldn't find a ...
2
votes
1answer
40 views

Execute a shell script only for LiveCD session [closed]

I want to execute a shell script on startup but only for LiveCD session not for harddisk installation. Which directory should I put my shell script? For example Ubuntu somehow detecting LiveCD ...
0
votes
1answer
63 views

How do i write a terminal script to setup ubuntu for me instead of spending days every time?

From what I understand I can make a text file with all commands same as I would type in terminal, make it executable and run it. Would running sudo mysetup.sh or mysetup.txt be OK so not typing PW ...
3
votes
1answer
69 views

How can I run a script when the power supply is plugged-in or -out?

For some reason, my laptop's screen brightness does not update when I plug-in or plug-out the power supply. I've looked at quite a few solutions for that problem, but none of them seemed to work well. ...
2
votes
1answer
38 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
40 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
78 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 ...
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 ]]; ...