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
13 views

“Permission denied” when download from script(ruby) file

I want to download a project's dependencies from a script file in tutorial said: run this comment to download ./download-dependencies core my way was like this: $ cd Documents/ImageProccesing/ $ ...
29
votes
10answers
94k views

How can I create a select menu in a shell script?

I'm creating a simple bash script and I want to create a select menu in it, like this: ./script echo "Choose your option:" 1) Option 1 2) Option 2 3) Option 3 4) Quit And according to ...
0
votes
0answers
18 views

Change iface when internet is slow bash script

Need help with script that will change eth1 or eth2 ( to auto set different route ). I have eth0 that is shared to lan and two different gateways (routers), one on eth1 and second on eth2. For now ...
2
votes
1answer
12 views

How to Launch Terminal Script with Appliation Icon?

I am relatively new to linux, but I wanted to get my Tor browser up and running. I have downloaded and extracted the Tor Browser Bundle. In order to open the browser I need to cd to the file and run a ...
1
vote
1answer
13 views

How to use Gimp Scripts?

I am interesting in using this gimp scripts When I threw them in my gimp script folder and started gimp version 2.8.10 I could not find any of this filters, So I have a question where can I find ...
1
vote
2answers
31 views

Will “kill -SIGTERM” stop “tail -f”?

Just as the title says, Google gives me nothing and I can't test it on this server. The command as is follows: tail -f <file> | fgrep --line-buffered "string" | sed -u 's/stuff//g' >> ...
1
vote
1answer
25 views

Is there a log of the output of “bash install.sh [ ]” available for Ubuntu server?

Following the advice of someone on this site I attempted to update a wireless device driver with: bash install.sh [] which I ran while in sudo. The update didn't work and I'm wondering if some ...
0
votes
0answers
20 views

It seems honeyd scripts didn't work?

I have configure honeypot using honeyd, but I couldn't establish any telnet, ftp, http connection on it, although related ports are open : here is the nmap scan from my xp OS which I try to establish ...
0
votes
0answers
23 views

Ubuntu 14.04 Wireless & Wired connection drops out

I noticed that a lot people has the same problem like me , I searched and tried many solutions which askubuntu users&others offered but it didn't work. Here's my wireless script output : ...
2
votes
1answer
55 views

How can I automatically copy the content of a usb (flash) drive to another directory?

I want to program my Ubuntu in such a way that it automatically copies the content of USB flash drive to a defined folder in my home directory. I would like this to be done automatically when any ...
0
votes
1answer
23 views

piping in real time

This is more a conceptual thing than a current problem. Would it be possible to do this: tail -f <file> | grep "string" | sed 's/stuff//g' >> output.txt The problem I'm thinking is that ...
0
votes
0answers
7 views

Reliance Auto Login Help

i want to run this script https://github.com/pteek/reliance-auto-login-script but i get this error in lubuntu " Traceback (most recent call last): File "./reliance-login.py", line 27, in ...
1
vote
1answer
32 views

Start script on boot up?

I want to run a script when the system starts. The script is: #!/bin/bash gnome-terminal --tab -t "MyPC" -e "sh -c 'nohup firefox & nohup gedit & bash'" --tab -t "MYPC2" -e "sh -c 'ls -al;ls; ...
0
votes
0answers
58 views

Bash script is not working. Could somebody help me?

E: Hi, i could use some help. I am sorry that some parts of the bash are in german. There are sure some mistakes in there but i can not find them i tried severel hours right now. I would be happy if ...
14
votes
7answers
59k views

How to run scripts every 5 seconds using cron?

I have a script that needs to be run every five seconds. I know that cron can do tasks by the minute, but is there a way to run something every second?
0
votes
0answers
28 views

Crontab wont run this script!

I am trying to run this script as a cron job to enable a weekly back up of my mediawiki site. Running on Ubuntu server 14.04. It simply will not run. The scipt is running from the root folder of the ...
1
vote
3answers
479 views

how to check if PPA is already added to apt sources list in a bash script

Do someone know how to check if a PPA is already added to my system before i add it with the add-apt-repository command in a shell script. That would be very helpful. Thank you.
0
votes
0answers
17 views

ssh connection problem

Hi everyone i am developing a robotic app, i want to run my launch files under a ssh connection with this script but when i run script it wants may password, i write it but nothing happens although i ...
0
votes
2answers
29 views

Script that generates a file with random content

Can anyone suggest a way to write a script that creates a text file filled with random data of exactly 12 MB ? Say I'm interested in creating within the script the file /home/student/john.bin that ...
0
votes
1answer
41 views

Using script to download a file

I'm interested in creating a script that makes no use of wget which downloads a file from a specified link . The download should be saved as world.o in the folder /tmp. Can anybody walk me through ...
2
votes
0answers
42 views

How to have a video player resume from where I last left off?

I'd like to be able to launch a video player (VLC, SMPlayer) via Terminal, using some command like resume_media and then it will automatically find the most recently played media file (.mkv, mp4 etc.) ...
2
votes
3answers
208 views

Displaying IP address on eth0 interface

How can I display the IP address shown on eth0 using a script ?
0
votes
1answer
47 views

Where is the laptop brightness script located?

Online I found the command: echo 1 > /sys/class/backlight/acpi_video0/brightness to set my screen brightness to the lowest possible value, currently I am grepping my entire disk for that path, ...
-1
votes
1answer
23 views

Script to process file/job in a folder [closed]

I have idea for a script but have no clue how to write it. I want to use a script to submit job from a folder. Per say, I have 4 jobs in the folder, when the script is executed, it will start from the ...
2
votes
1answer
7k views

Tomcat Installation startup.sh not working

So I've followed the list of steps on : https://www.digitalocean.com/community/articles/how-to-install-apache-tomcat-on-ubuntu-12-04. When I try to run the startup script, I get this message: ...
15
votes
3answers
24k views

At what time does cron execute daily scripts?

If I place a shell script in /etc/cron.daily/, at what time of the day will it be executed?
0
votes
1answer
22 views

How to delete backup files using a bash script? [duplicate]

I want to automatically delete the backup files(those ending with ~) from everywhere on my computer. I tried to write a simple script usinglocate command, but I'm stuck at deleting file having space ...
1
vote
3answers
89 views

Bash command to convert IP addresses into their “reverse” form?

When I run nslookup on an IP (These are all examples) nslookup 192.168.1.123 Current output: 411.311.211.111 Desired output: 111.211.311.411 I have a script that works just seeing if there's ...
0
votes
1answer
16 views

Problems appending lines from a script

I'm writing a script and here's how i'm inputting into the CurrentOutput.csv file. echo "$col1,$col2" >> CurrentOutput.csv Input.txt 1.2.3.4 2.3.4.5 3.4.5.6 CurrentOutput.csv 1.2.3.4 ...
2
votes
1answer
59 views

Make a text file my automatically updated background?

I want to make a "to-do" list my wallpaper. I was hoping to be able to write a text file, save it, and have the background be updated each time I edit file. Is this possible?
0
votes
1answer
20 views

Linux alternative to Windows Script Host

I've just switched from Windows to Ubuntu. Really enjoying it right now and haven't encountered any issues whatsoever. The only thing is that I'm really gonna miss a lot of useful things that Windows ...
2
votes
3answers
180 views

Why do I have to change into my private bin folder to execute an .sh script?

I have a private bin folder in my home directory. It's is also in my path. If I try to run a script from anywhere else in my system but within that folder, I get sh: 0: Can't open [name of ...
0
votes
0answers
30 views

How can i change a script to a system command? [duplicate]

If I have a script, let's say shebang.sh. To execute, I have to do './home/user/Desktop/shebang.sh ' How can I make it 'shebang' From any directory?
2
votes
3answers
60 views

How to install the Jason plugin for jEdit?

I am a newbie in Ubuntu (14.04) so I am very appreciative if you can guide me how to install Jason as a plugin of jEdit. Jason installation homepage. jEdit plugin installation instructions. The ...
61
votes
1answer
36k views

Differences between /bin, /sbin, /usr/bin, /usr/sbin, /usr/local/bin, /usr/local/sbin [duplicate]

I'm running an Ubuntu Server 13.04, but I see the same on a 12.04: I have six directories with command files. These are: /bin /sbin /usr/bin /usr/sbin /usr/local/bin /usr/local/sbin What are the ...
0
votes
1answer
14 views

adduser causes strange messages when called from preinst script

I have a .deb package in which I have a preinst script that executes the adduser program in case a certain user is not already present on the system. $(id -u {username} > /dev/null 2>&1) if ...
2
votes
1answer
234 views

How to use debcondf Show results with debconf-set-selections?

I'd like to know in common how to use the results of debconf-show with debconf set selections to precvonfigure deb packages with the command line or within a shell script For example If I use sudo ...
0
votes
1answer
34 views

Script to remove JPG's with particular vendor tag

Somebody put their memory card into my smartphone, and suddenly (with auto-upload enabled) I have a folder full of photo's that are not mine on my Ubuntu machine. How can I delete JPG files that have ...
0
votes
0answers
13 views

start krusader editor from a command line bor bash

I am really happy with Krusader's internal editor and I would like to use it for editing files via bash scripts. So instead of: leafpad ubuntu.txt I would like to run say something like that to ...
0
votes
0answers
57 views

Remove “android-tools” package (adb and fastboot) and sdk from 64-bit 12.04

I installed Android SDK to root my android phone, using a script obtained thus: wget http://linuxundich.de/static/android_sdk_installer.sh chmod +x android_sdk_installer.sh sudo ...
1
vote
0answers
103 views

Keyboard shortcut script not working

I finally gave up on getting my Fn+up/down keys to change my screen brightness on my laptop. I took a brightnessup.sh and brightnessdown.sh script and put them in /etc/acpi and then went to keyboard ...
2
votes
1answer
58 views

Run script with arguments as sudo without being asked for password

I have two programs in Java that I'm calling from bash script: java program1 arg ... arg sudo java program2 arg ... arg I want to run program2 as sudo without being asked for password. I'm aware of ...
0
votes
1answer
5 views

I set a script to start at boot with kde startup and now if I log into my main account it locks after I click anything to delete it

I'm new to Linux and I was trying to set a script to adjust my mouse acceleration on startup but when I set the script path on kde startup I didn't adjust the text file to anything special I just left ...
0
votes
1answer
22 views

unable to execute after loading second shell /bin/bash?

I went through a shell scripting tutorial explaining about global variables (export). I encountered a do-it-yourself example to illustrate the concept of global variables in shell scripting, and I ...
0
votes
1answer
22 views

How to use script parametr(folder path) as a variable?

I want to write a script which can delete all 0 size files. I already have command to do this - find . -size 0 -type f -delete. The problem is that I want to use 1st script parametr as a path. I had ...
0
votes
0answers
9 views

ACL - only grant access to reading, *not* to execution

I have a directory called /test it there are two files: info.txt script.sh I want to grant read-only access to user john and did the following: setfacl -m u:john: r test/ With the above command ...
24
votes
7answers
2k views

Delete all files apart from pdf files in a directory

I have a directory that contains the following: x.pdf y.zip z.mp3 a.pdf I want to delete all files apart from x.pdf and a.pdf. How do I do this from the terminal? There are no subdirectories so no ...
12
votes
3answers
18k views

Why is the command in /etc/rc.local not executed during startup?

I have a single command in my /etc/rc.local script that is supposed to start the update daemon for Tiny Tiny RSS during startup, but the script is not executed during startup. Why? The entire ...
2
votes
0answers
55 views

How do I force nmcli to reconnect to different uuid?

I have a bash script that checks my network environment and mounts shares accordingly. If I'm at work and have a hard-wire connection to the LAN, then I'd like to activate a hotspot connection for ...
28
votes
5answers
24k views

Beep in shell script not working?

I'd like to use a beep sound in a shell script. Unfortunately none of the methods I found via Google work for me. I tried echo -e '\a' echo -ne '\007' and the command beep after I installed it ...