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
0answers
27 views

Get file created by a program launched by a bash script

I have the next scripts: | base_dir/ | - test.sh | | tests/ | | - elaborato.sh test.sh run elaborato.sh elaborato.sh could create a file (not always it create a file). I need : to know the ...
0
votes
1answer
21 views

Ubuntu 10.04 LTS - screensaver using image from shared directory

I wonder if any Linux expert can give me a help on this? I'm stuck with a task that I need to deliver tomorrow, which is to figure out how to setup a screensaver on many machines with Ubuntu 10.04 ...
1
vote
1answer
18 views

Desktop shortcut doesn't work for script but script work fine

#!/bin/bash/ ls -1 *.mp3 > playlist.m3u for (( ; ; )) do mplayer -playlist playlist.m3u; sleep 0.1; done This is the script and it works ! [Desktop Entry] Version=1.0 Type=Application Name=Play ...
1
vote
2answers
30 views

Permanent autostart

I would like to make a Python 3.4 script that starts with my computer so that it's permanently checked to start up with the computer. The script does not need to end, particularly. I don't want ...
0
votes
2answers
29 views

need to match a string and then print next string matches and continue till next string

I am having troubles with manipulating a big text file, My sample f1.txt have several 3000 plus lines, with below format I need to match a string , and then match lines after that string with ...
0
votes
1answer
28 views

BASH script for extracting archives - how to make the script ask for folder destination?

I've started using the bash script below, for unpacking archives. How would I go about making the script ask if I would like to specify a folder, or just use the default folder to extract to? I'd ...
0
votes
2answers
53 views
+50

How do I run a script on Unity login/logout?

I have two scripts - one to mount some folders over SSHFS - and one to unmount. I would like to launch the mount script when my default Ubuntu desktop is launched (after I log in at the graphical ...
1
vote
2answers
16 views

Automatic screen capture script

I'm looking to accomlish exactly what Anwar Shah describes here Bash script to take screenshot and save the image - Ubuntu with the added functionality of setting a time increment for the script to ...
0
votes
2answers
31 views

setting up a script to rotate scren Lenovo Yoga Thinkpad S1

I am trying to set up a Lenovo Yoga Thinkpad S1 to rotate the screen with the touch of a button but I am having a little trouble with the script that actually does the work. I have found the scripts ...
0
votes
2answers
27 views

Open terminal in 'always on top' mode on startup

I want Ubuntu to open a terminal in the lower right corner when I log in, with the always on top mode enabled. I have made a script which does this when I run it from a terminal, but it does not work ...
0
votes
1answer
22 views

Simple bash script not working

I'm pretty new to bash scripting. I'm trying to make a script to export the http_proxy variables. This is what I do from the terminal: $export http_proxy=http://proxy21.iitd.ernet.in:3128/ $export ...
-1
votes
1answer
35 views

run bash script from another script and redirect its output

Hi everyone I have to do a program.. I'll be really concise to explain it... And hat I've already done and what i have to do... Simply, I have to do a "simulator" in Bash that run exercises of ...
0
votes
2answers
33 views

End script and restart it with the same options and arguments

Usually !! repeats the last given command. But it doesn’t seem to work in a bash script. Is there a way to end a script and repeat it with the exact same options and arguments given the last time? ...
0
votes
1answer
26 views

problem occuring while creating .exe file

I'm trying to run test problem in the mfix but got struck with an error sh: 0: Can't open ../../model/make_mfix. bhaskar@admin2-Precision-T7600:~/mfix/run/tests/Added_Mass$ sh ../../model/make_mfix ...
0
votes
1answer
38 views

Run terminal command (python command) at start up [duplicate]

New to Ubuntu, but have looked everywhere to get this question answered. Found no solution so far. Basically I need to run two terminal commands on startup, which follow each other directly. This will ...
1
vote
0answers
33 views

How do I open an URL from a bash script?

I have a simple script to start a node.js webserver and open the URL in a browser. However the last part doesn't seem to work, it wont open the URL in a browser (or anywhere else). This is the code I ...
5
votes
5answers
690 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
votes
1answer
26 views

Can someone kindly tell me what this line of script does [closed]

I had this segmentation fault while trying to run a script. I will like to know what it means.Thanks ./start_enb.bash: line 202: 8746 Segmentation fault (core dumped) ./lte-softmodem -K ...
1
vote
1answer
31 views

Make password appear censored in bash script

I am going to make this short and simple. I am making a bash script where the user needs to enter their root password using the read command and it will be stored in a variable. What I don't like is ...
2
votes
2answers
63 views

What is wrong with this script?

So I got this script from this guide: www.tldp.org/LDP/abs/abs-guide.pdf LOG_DIR=/var/log ROOT_UID=0 LINES=50 E_XCD=86 E_NOTROOT=87 if [ "$UID" != "$ROOT_UID" ] then echo "Must be root to run this ...
0
votes
1answer
33 views

Kindly explain to me what this script does

Can someone kindly explain to me what this script does? I am a newbie to scripting language. if [ $# -eq 1 ]; then declare -x CONFIG_FILE_DIR=$1 Thanks
0
votes
1answer
21 views

Running a .bash file in Eclipse

I know this is really an Eclipse issue but I can't seem to login in their forum. I am running eclipse juno for some c/c++ development.However, I wrote a .bash script that initiate the entire ...
1
vote
1answer
20 views

passing a font as an argument to a script

I am trying to use osdSH for notifications. It has a 'font' parameter that receives a curiously formed string. From the man: -f -font Set font (Default: ...
0
votes
2answers
27 views

Why the same .sh does not work with 2 different users executing it?

I have rwo users User1 and User2. I have this script1.sh inside User2 home folder: #!/bin/bash cd /home/user1 && ./script2.sh that calls script2.sh: #!/bin/bash if [ 2 > 1 ]; then ...
0
votes
1answer
63 views

Script for changing resolution!

I need help writing a script/program that changes my resolution. When I click on that program I want it to change the resolution. I'm pretty new to Ubuntu, but I gave it a try and wrote one on my own, ...
2
votes
2answers
65 views

.sh file on Startup Applications isn't executed

This is a followup to a question about dialog boxes. I want to show a dialog box both at the start of a session, and after n minutes of inactivity. I have decided to use zenity and xautolock. I have ...
1
vote
2answers
31 views

Do higher level scripting languages use shell scripts to work?

I'm just learning about bash and when I saw that bash uses 'echo' I tried to search for the relationship between PHP and bash and it seems like people are building programs were bash script and PHP ...
0
votes
2answers
17 views

Can't figure out JOIN command

I have two files and I'm trying to join them at a certain spot. I'd like to join them at the fourth column of the second file using the first column of the first. It's driving me nuts! Here is what ...
0
votes
1answer
23 views

How to schedule a shell script using crontab [duplicate]

I want to schedule a shell script to run everyday excluding sunday at 7:30 pm using crontab can you please help
1
vote
3answers
32 views

Query about a script that makes webcam take an image every x seconds

I have a Trust usb webcam. I'm looking for (or creating) a script that could take a screenshot from the camera every 10 seconds and save the image to disc with a timestamp for a filename. I've found ...
0
votes
1answer
34 views

Tell me where is mistake in anacron task?

I have tried to make this task for abacron: dm@dm-system:~$ cat /etc/anacrontab # /etc/anacrontab: configuration file for anacron # See anacron(8) and anacrontab(5) for details. SHELL=/bin/sh ...
2
votes
2answers
81 views

bash utility 'dialog' leaves a messy screen

When I run this script it displays options in a menu style on my terminal and then runs the relavent command in the script. #!/bin/sh TEMP=/tmp/answer$$ dialog --ascii-lines --title "Administrative ...
0
votes
1answer
36 views

Complicated script involving command line and XFCE Terminal

I run Ubuntu 14.04 and installed the XFCE Terminal for some reason, and what I want to do is make a script to go to a folder on my hard drive under /Server/Gen2 and run several .sh scripts in ...
2
votes
3answers
290 views

Trouble using cd command with “~” or “$HOME” in bash scripting

We know that ~ and $HOME refer to the home directory of the current user. (For me echo ~=echo $HOME=pandya). But I can't use it in bash scripting. Here is a simple example script: #!/bin/bash echo ...
1
vote
0answers
58 views

Dropbox not running after logging off: init.d vs. dropbox.py

I'm inheriting admin control over a server used to process and share data between investigators. We've been trying to use Dropbox to share some of the files. Dropbox was installed when I took over the ...
2
votes
1answer
43 views

script in bash not understood using terminal in Ubuntu 12.04 [closed]

Can anyone tells me what does this script means found in a .sh file:: [ ! -n "$T_R" ] && echo "Message Appear" && exit 1;
0
votes
1answer
21 views

variable.sh is not exporting the variable using terminal

I want to export many paths using a .sh script. after running it nothing is exported I don't know why. so if anyone can advise. This is the script used: #!/bin/bash txtrst=$(tput sgr0) # Text reset ...
1
vote
1answer
31 views

Declare a variable when running the script bash

How to declare the variable content when running the script? I know that is possible to use $1 $2 $3 to set a variable when running the script ./script.sh this is sparta, but I did not found a way to ...
0
votes
1answer
36 views

call shell script from php when ubuntu 14.04 (rightly) disables the shell for www-data

I just migrated from 12.04 to 14.04. 14.04 (sensibly) disables login / shell for www-data. But my php site needs to run some shell scripts to run stuff like kindlegen, rsyncing files to another server ...
0
votes
0answers
22 views

Permissions when running second level script

Evening Everyone, I have 1 bash script that starts the program Motion (some may be familiar with). Motion links to a script in the motion.conf upon picture save or file save to a perl script that ...
0
votes
0answers
12 views

Ubuntu crashing on purple loading screen

I've done something which unfortunately seems to have caused Ubuntu 14.04 to fail at start up and was wondering whether I could get some guidance about debugging the issue. It started when I rebooted ...
2
votes
3answers
80 views

How to activate script on laptop from smartphone?

I want to run a linux script on my laptop remotely from my smartphone (iPhone, namely). For simplicity let's say the script is called myscript.sh and it is located in /root/Desktop. I am running as ...
0
votes
1answer
37 views

Why does hitting Control + C when in an application launched from a script, break the script?

To jump straight in: while true; do #--- MENU LOGIC HERE, stick response in $MENUEXIT #----Deal with responses here if [ $S1 == $MENUEXIT ]; then tail -f /path-to-file ...
2
votes
2answers
58 views

installing a script in $PATH

I am trying to use yeoman in Ubuntu. Everything is installed correctly but I can't use the command yo from bash. If I navigate to the appropriate directory and run node cli.js everything works from ...
2
votes
2answers
199 views

How to start GUI application with upstart?

I have struggled with this problem for three days and I have tried many ways to solve it but not successful yet. I hope you guys can help me... I have an GUI application. I want to start this ...
2
votes
2answers
127 views

Translating from Red-Hat to Ubuntu

I am starting in linux because I need it for my reseach. Since I have little time and no local expert support, this is a need based self-learning experience. I have to install a tool and I got this ...
0
votes
0answers
22 views

Script runs program instead of just running script

I want to make a script to run the following command with a double click. My script is: cpufreq-selector -c 4 -g performance Manually running it in terminal is fine but if I use a .sh file it ...
1
vote
2answers
42 views

Cannot run an executable file in terminal [closed]

I have been running my script ./runenb a couple of times. I decided to log the output into a file so I used: ./runenb >output.txt and it works. Then I tried again and this time I did ./runenb > ...
1
vote
2answers
28 views

Startup script for brightness

Not so long ago I replaced XP for Lubuntu 14.04 on a old PC, and it works great. To make it perfect, I want to autoexecute "xrandr --output VGA-1 --gamma 3:3:3 --brightness 1" on startup or boot. ...
1
vote
1answer
15 views

Can a script that is run as root, run another script as normal user?

So, if I run script as root using gksu, can that script run another script as normal user? Thanks!