A shell script is a script written for the shell, or command line interpreter, of an operating system.

learn more… | top users | synonyms (1)

0
votes
4answers
72 views

SSH remote command execute stays without disconnect when finished execute?

I am trying to build a script/command that will restart our Asterisk/Elastix service on our PBX. The script is basically using simple command with auto log-in public key that run from Ubuntu ...
0
votes
1answer
66 views

Unigine Heaven run directly from terminal?

I think a lot of you would have benchmarked your Linux system using Unigine Heaven Benchmark 4.0. I know to run the it you can simply go to the Unigine Heaven folder and run the shell script file ...
0
votes
1answer
42 views

Script To Logout Root and Login User

I was wondering if there was a way to make a script that logouts of root or takes the automatic root login and logs in a user. This is for security reason so that the user cannot change important ...
5
votes
5answers
316 views

Needed simple script/loop/command for input command, execute and output within textfiles

Suppose I have list of commands in text file as below (cat cmdlist.txt):- cut lshw top awk sensors Now I want to get simple information on that command by whatis cut, whatis lshw etc. respectively ...
1
vote
1answer
139 views

sed “Permission denied” and “No such file or directory” errors while building Clockwordmod

Whenever I execute the command build/tools/device/mkvendor.sh samsung_aegis2vzw /your/path/to/the/boot.img I get this as the output build/tools/device/mkvendor.sh: line 83: /sedcommand: ...
14
votes
2answers
3k views

Installing breach browser

EDIT: Just look at the accepted answer. I wasn't how it worked at the time of writing so I just guessed below. I am new to Linux so this might be a noob question. I am trying to install a new web ...
1
vote
2answers
76 views

Specify password for sudo in script

I am making a script that will update my system (and do some other things, but that doesn't matter). I want the script to run sudo apt-get update and sudo apt-get dist-upgrade --yes automatically. I ...
0
votes
1answer
99 views

access to column in python like awk [closed]

This is my data file: Iam python newbie If I use awk to access columns element, that is easy just by $1. how can I access this columns element on python?
2
votes
1answer
102 views

Script adding launchers to the top gnome panel

For a large number of machines running 12.04 with gnome-classic. I'd like to script adding launchers to the top left of the gnome panel. I know how to add them manually but this is a tedious ...
0
votes
1answer
45 views

one column from output column on awk

Suppose which I have this table: one two three four two three four five three four five six four five six seven five six seven eight so I wrote awk -v word=two '$0 ~ "[^[:alpha:]]" word ...
0
votes
2answers
36 views

Prevent parameter expansion in shell script

Folks, I often have to do a recursive search in files. Tired of typing the whole "find/grep" combination all the time, I just created a script with the following line: find . -name $1 -exec grep $2 ...
1
vote
1answer
46 views

Pass variables to script which called script

I have a bash script which must call another bash script which varies per-user in order to get some configuration information, like so: somescript: #!/bin/bash ${HOME}/.ssconfig echo "Hello, ...
0
votes
1answer
36 views

In this script, ~ is /root/. How to be in /home/name-of-the-user/?

#!/bin/bash #become root UID=$(id -u) if [ x$UID != x0 ] then printf -v cmd_str '%q ' "$0" "$@" exec sudo su -c "$cmd_str" fi mkdir ~/.D3GO/; cp -a `pwd`/viewright_backup/. ~/.D3GO/; ...
0
votes
2answers
24 views

How to make a script that will make another script in the same folder executable?

How to make a script that will make another script in the same folder executable? I don't want to worry about path since it will be in the same directory. So it should be something like(i'm trying to ...
1
vote
1answer
31 views

Launch app with absolute path does not woks

I'm quite new in Linux environments, but for this one, I need help on bash. I'm on Kubuntu 14.04 x64 I have an embedded JRE for my business application , placed like this: app_root/run.sh (my ...
2
votes
1answer
109 views

How to write a script to run different application

I am very new to linux platform. Looking for a script file to call different application start up file located in different location and needs to be run in different terminals. For example : i ...
0
votes
1answer
78 views

How to open a bash script in Terminator using a command line?

so basically I have a program called Terminator and I want to open a .sh script, however, I don't run to run it as root, I basically want to have Terminator run the script, using another command line, ...
1
vote
1answer
73 views

Run the script file after 5 or 10 min after restarting the system

I have created a ruby script file that checks the connection present or not. For example checking port 22 is opened or not. Firstly I tried with cron job as follows @reboot find ...
-1
votes
1answer
70 views

Why can't I update my system via shell script?

I have a very simple script, let's call it update.sh: #!/bin/bash echo "Updating system..." sudo apt-get udpate sudo apt-get udgrade Running this script, throws the following error: me@host $ ...
1
vote
4answers
171 views

How to make Start up script for Making Application run on startup

I have one jar which i need to run on startup and no matter whatever user is logged in and that need to take that user name automatcally here this code can take user name echo $(logname) and this ...
1
vote
2answers
73 views

Unable to run shell script inside VI/VIM

I am trying to run a shell-script say test from vim #!/bin/sh echo good morning Now when I am using :!% I am getting a pop like shell returned 1 Press ENTER or type command to continue instead ...
0
votes
1answer
35 views

Subshell in script wont print corectly

Why does my shell and subshell only print the first hour in my for loop? It's supposed to loop through all 24 hours in a day but only prints the first hour correctly. { for D in $(seq -f "%02g" 1 ...
2
votes
3answers
52 views

automate multiple file conversions

I need help fixing my script to automate multiple file conversions. I am working on the server and I am trying to find a way to convert files automatically. The conversion needs to be made through ...
0
votes
0answers
23 views

How do I start a tmux window on startup and execute a scrips

I would like to be able to start my server and have a detached tmux window with a script running. So then I can attach with ssh and be able to work with the script. Thanks, Anthony
0
votes
1answer
41 views

Multiple background scripts in one command

I can run three scripts at once like this: python script1.py ; python script2.py ; python script3.py But when I try to run them all in the background, like this: python script1.py & ; python ...
1
vote
0answers
68 views

How can I draw selection rectangle on screen for my script?

I am trying to make a simple screencasting bash script. I want to get screen selection coordinates by drawing a red rectangle with mouse. I can use xdotools to get coordinates but how can I draw ...
0
votes
0answers
29 views

Issues with Grep

Why does the bottom line output "0" into the "AD-Results-$month-$Y" file? First grep command fgrep "$month $D $i:" $Filetmp > TempOutput Grep command to read "allows" from tail of ...
2
votes
2answers
290 views

Convert seconds since epoch to a human readable string

Command date +%s produces 1403568422. Is there an easy way to convert the 1403568422 to a human readable UTC timestamp? python -c "import datetime;print ...
2
votes
1answer
83 views

Trying to use GNU Parallel with sed

Why does this line do nothing? I'm trying to run a "sed" command in parallel and it outputs nothing to "standard.txt" $Filetemp = the file I'm stream editing standard.txt = the file I'm outputting ...
1
vote
2answers
99 views

How to execute a command several times in the terminal with/without a few minor changes?

Suppose that I want to execute the command ls ten times (despite of it being purposeless since it will only display the directory contents 10 times), is there an equivalent to writing the following: ...
1
vote
1answer
235 views

How do I write an iptables rule to limit Internet bandwidth usage of user or IP address

How do I control or limit Internet bandwidth usage of users/computer/IP address in network with the help of iptables rules? I have one static IP address which provides Internet (that is, WAN). I ...
6
votes
1answer
81 views

Create a script to open firefox with some google search term from terminal

Is there any way to create a script or a program that will open firefox, go onto google and search for the arguments passed to it ? So something like google How do I shoot web should open Firefox ...
-1
votes
1answer
93 views

getting festival to talk at start up ubuntu 14.04

using this script: week=$(date +”%A” ) day=$(date +”%e” ) echo hello $USER you are super awesome i am your processor | festival –tts echo today is $week $day | festival –tts echo have a nice day | ...
0
votes
2answers
73 views

script terminate

# Check if VPNC is already running, otherwise start it if ( ps -ef | grep -v grep | grep -v vpnc_ondemand | grep -v less | grep vpnc > /dev/null ) ; then echo "Shell script is already running ...
0
votes
1answer
29 views

Is there other way to get your DISPLAY env without using shell?

I have a script that will get executed by incrond when it sees changes in a watch dir. There is only a few env vars that are available in the script, the rest get cleared by incrond. So this becomes a ...
2
votes
2answers
113 views

Shell Scripting Function question

I have this code snippet I am working on for a small project I am doing: echo "Please enter SUID: "; read $uid uid_Assoc(){ arg1=$1 echo $1; } uid_Assoc Now to start, I would like ...
22
votes
3answers
1k views

Can I modify a bash script (.sh) file while it is running?

Suppose I have a script script.sh, which takes some time to execute. I execute it, ./script.sh. While it is running in a terminal window, I modify the file script.sh. Will this have any effect on the ...
0
votes
0answers
29 views

Is it possible to launch an application inside a Virtual Machine? [duplicate]

I am currently running Ubuntu 14.04 as my main OS, with a Windows 7 installation inside VirtualBox for things I just can't easily do on Ubuntu (like running Microsoft Office). Now I am wondering if ...
1
vote
1answer
94 views

Editing Gsettings unsuccesful when initiated from cron

I must have a blind spot, but I cannot find what it is. I made a small python script that removes VLC from the sound menu. It runs perfectly in any way I run it from the terminal or from a launcher ...
0
votes
0answers
35 views

getting error in opening py file [duplicate]

I'm installing a software in Ubuntu 12.04 and got the following error: http://paste.ubuntu.com/7638369/ server@ubuntu:~/Desktop/revkit-1.3$ ./tools/gui/gui.py Traceback (most recent call last): ...
-1
votes
1answer
115 views

execute script with sudo after login [duplicate]

i need to execute the following commands AFTER login. sudo hdparm -y /dev/disk/by-uuid/443AFBAD7FE50945 sudo hdparm -y /dev/disk/by-uuid/7ABB49654B799D40 (trying to edit rc.local does not work ...
0
votes
0answers
21 views

ubuntu 14.04 I want my computer to talk to me at startup [duplicate]

using Festival Jovie need a script to run at start up so computer will talk to me.
0
votes
0answers
14 views

How to Open Certain Extension with Python Script [duplicate]

I would like to set a python script as the default method for opening a certain type of file. Is there a way to do this? For example, take the files called special.abcdef. I'd like Ubuntu to always ...
0
votes
0answers
30 views

Disabling sticky edges for multiple users at one time

I am trying to disable sticky edges for multiple users across multiple machines. Currently I am using the following code in a script I use for setting up a new machine. dconf write ...
17
votes
3answers
3k views

Why doesn't “cd” work in a shell script?

What is wrong with this easy script? I just want to write an script which change my directory: A. I put below commands on the file witch its name is pathABC on the /home/alex directory, #!/bin/sh cd ...
0
votes
3answers
227 views

Run script full screen in terminal

How do I get a bash script to run in full screen when it's executed or how can I change the terminal size if I can't make it full screen?
0
votes
0answers
24 views

cron to email when a psql stops recording data

I have a PSQL setup and records data every 10 minute or less. The connection sometimes dies and it results is logging failure and I have no idea when that happens. I want to create a cron job to email ...
2
votes
0answers
43 views

Script Issue (Incrementation) [closed]

I'm writing a script in bash. My output down below is wrong. The test data I'm pulling from makes it so that all connections allowed and denied should be in time "00" yet for every day I crawl through ...
1
vote
1answer
82 views

How can I create a script that allows all users to change network connections?

I want to create a bash script to enable all users to connect to wireless networks. Following the instructions on this page, I can set that and it works. However, I want to be able to do this more ...
3
votes
2answers
123 views

Why does a bash-zenity script has that title on Unity Panel and that icon on Unity Launcher?

I have this small bash script which helps use Infinality font rendering options via a more user-friendly Zenity window: http://gnomefiles.org/content/show.php/Infinality+Style+Changer?content=161984 ...