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
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
54 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
27 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
263 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
62 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
89 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: ...
0
votes
1answer
164 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
70 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
79 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
72 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
111 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 ...
21
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
28 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
88 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
31 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
104 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
26 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
168 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
22 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
40 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
79 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
103 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 ...
0
votes
1answer
41 views

How to add a runonce startup script?

I'd like to add a runonce start-up script on Ubuntu which is expected to be run after the network interfaces have been initialized and before any user logs in. So which is the appropriate place to do ...
1
vote
1answer
99 views

bash script move file to folders based in name

I hope you can help me... I made a perl and bash script to make a backup of my firewalls and tranfers via tftp #!/bin/sh perl /deploy/scripts/backups/10.160.23.1.pl > /dev/null 2>&1 ...
0
votes
1answer
20 views

How to create a script to launch several emulated ROM inside a folder

I would like to create a script to run simultaneously all the N64 Roms that I put inside a folder, reading the names from a text file. Since now I did a script like this: cat ./listN64_full.txt | ...
2
votes
1answer
36 views

Perform some operation as soon as eth0 is up

I have to perform a routine which requires eth0 to be up. I have tried to put it into /etc/rc.local, anyway it could not be triggered as eth0 could have not been initialized yet. Is there a way to ...
0
votes
2answers
48 views

Redirecting output to std output or /dev/null depending on optional parameter

I have a script where you can run it just like this ./myscript and the output of some commands called inside the script are hidden, just like this: if mvn tomcat:deploy &> /dev/null; then ...
0
votes
1answer
63 views

Run scripts in background in TTY

There are quite a few questions asking what you can do to run a shell script in the background while not running the terminal. Most have advised to use nohup or disown. This might be a stupid ...
2
votes
1answer
62 views

How can I set Firefox settings with a bash scipt?

I would like to create a bash script that I can run on several computers that will set some basic preferences and bookmarks for Firefox (and possibly Google Chrome) on Ubuntu 12.04. I think user data ...
1
vote
2answers
51 views

Running shellscript with cronjob is making problems, executing manually not. Ideas?

I made a shell script called /home/root/cron_grads.sh (chmodded 755) on my server. In this directory are more grads-scripts like 500hPa_p0.gs (644). My main script creates a temporary file ...
7
votes
4answers
588 views

How to check the process is already running or not

I want to check the particular process in already running or not. I refereed this Q&A. But I didn't get any specific solution. Following is the example that I tried: I have created abc.sh file ...
0
votes
1answer
79 views

Bash script not adding variables to session [duplicate]

I have a bash script that I have added as a startup application. It does a bunch of exports and alias assignment. #! /bin/bash alias devhm='cd ${DEV_HOME}; ll'; alias wlhm='cd ${WL_HOME}; ll'; alias ...
1
vote
0answers
29 views

suppress all interaction while installing apt-fast

I want to ask whether there is any method to suppress any interaction while installing apt-fast using apt-get. I add the ppa source and then use the next command to install apt-fast: sudo apt-get -y ...
0
votes
1answer
56 views

Permission error trying this backup script

I am trying this Backup Shell Script from the server guide. Granted it's for my desktop running Xubuntu 14.04. The NFS is mounted and accessible. The script has been created and edited with the ...
0
votes
0answers
22 views

Send invites email to people in this file

For example we have a file and in this file we have email addresses to some people. Is it possible to make script which will take this file and mail to all people in this file and with info about ...
0
votes
0answers
21 views

Only part of my startup script gets executed

I have a script located under /etc/profile.d that executes when I login via the gui. All I need this script to do is connect to my pptp server with a single command which runs flawlessely when I ...
1
vote
1answer
297 views

How do I write a script to output an html file?

What am I doing wrong in this script? #!/bin/bash cat > /tmp/flash-viewer.htm <<- _EOF_ <HTML><HEAD><TITLE>Flash Viewer</TITLE></HEAD><BODY> <object ...
1
vote
3answers
258 views

Python command in bash does not find -c flag

I have two python lines in my bash script, both should run with -c flag, but once I run the Bash script it tells me that it could not find -c flag that is needed for python to run the command in Bash. ...
2
votes
1answer
33 views

How to run scripts as user (not as root) in lightdm?

I want to run some scripts before login every time my PC is started. I add the scripts in as greeter-setup-script in lightdm.conf. However, all the scripts are running as root! I want to use normal ...
0
votes
0answers
36 views

Bash if password filled save it

I am trying to save a password to gnome keyring via python script. The python script will be runned from bash script if password is filled in zenity GUI. Example: User inserts hes/hers password to ...
2
votes
0answers
57 views

Startup script to unmount and re-mount a USB device

I have a Microsoft wireless mouse and it has a scrolling issue in Ubuntu. The scrolling is too sensitive. I've read in other threads that the solution to this is unplugging the USB receiver of the ...
2
votes
1answer
48 views

How to refresh privileges on a script?

I have an script that modify files and group permissions. But it doesn't bring effects 'till I close the session and open a new one. Instructions where permissions are changed: sudo groupadd ...
0
votes
1answer
132 views

How to debug initramfs scripts?

For my Ubuntu 14.04 setup, I have 4 LUKS partitions that work as backing block devices form my BTRFS root partition. Using the default settings I could not get the 4 encrypted partitions unlocked at ...
0
votes
2answers
51 views

How to list directory contents recursively? [closed]

I need help with a script that displays the subdirectory structure of the current directory, along with the names of files in these subdirectories. I've tried commands tree, ls, and grep but it is ...
3
votes
2answers
2k views

Unable to execute .sh files in Ubuntu 14.04

I am unable to run .sh file in Ubuntu 14.04. The same file was executing in earlier version 12.xx. After upgrading to 14.04, this file stopped running. How to resolve this issue?
0
votes
1answer
85 views

How to launch .sh from third party program?

I have the program Lutris installed on my computer and I am going through adding all my linux games. However some are .sh execs others are .bins and executables which both added fine. the .sh ones are ...