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

My bash script only opens editor, why doesn't it run? [duplicate]

I created a script to dd sdb to sdc on my older computer with Ubuntu 13. It ran when I clicked on it – asked if I wanted to run in terminal or edit it. On a newer computer, with Ubuntu 14, I created ...
0
votes
0answers
8 views

Script switch to Audio and HDMI when clicked

I have a pc with the HDMI cable always connected. I need a script to switch audio from HDMI to Analogic audio and viceversa. Can someone help me? :D Thanks
0
votes
1answer
16 views

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

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/ $ ...
0
votes
0answers
21 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
15 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
16 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
32 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' >> ...
0
votes
0answers
23 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
26 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 : ...
0
votes
0answers
9 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 ...
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 ...
2
votes
1answer
56 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
0answers
60 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 ...
1
vote
1answer
36 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
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 ...
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 ...
2
votes
3answers
209 views

Displaying IP address on eth0 interface

How can I display the IP address shown on eth0 using a script ?
-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 ...
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 ...
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 ...
0
votes
1answer
21 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 ...
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
181 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
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 ...
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
15 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
61 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
3answers
90 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 ...
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.) ...
0
votes
1answer
23 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
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

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 ...
2
votes
1answer
61 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
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 ...
2
votes
1answer
59 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
21 views

Launch url to start a script like a cronjob?

I have a website on mutualised hosting (server A). I need to run every minutes a script, I just need to go to http//www.mysiteserverA.com/run.php I searsch a solution automaticly run this script every ...
1
vote
1answer
26 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
2answers
32 views

Find and execute multiple scripts in parallel

G'day, I have tried to solve this problem all morning but have not had success. I would like to search for certain scripts in a particular folder and execute them all in parallel. The scripts have ...
1
vote
1answer
24 views

variable is not found in a bash script

I have written the following code to create a directory where the directory name will look like "nowt_hour_nimute_second". But the code is failing in Bash Shell. #THIS CODE WILL CREATE A DIRECTORY ...
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 ...
2
votes
0answers
57 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 ...
3
votes
1answer
196 views

Stop/kill running script if $USER != “root”

I'm working on a scripts that needs to be executed as root, else it should stop everything. #!/bin/bash validationRoot() { if [ $USER != 'root' ] then echo "You're not root! ...
0
votes
1answer
30 views

Can somone help me make this script more readable?

SRC="/src" export DEST="/dest" find "${SRC}" -iname '*' -type f -exec bash -c 'EXT="${0##*.}"; EXT=${EXT,,}; if [[ "${EXT}" == *"/"* ]]; then EXT="no_extension"; fi; mkdir -p "${DEST}/${EXT}"; rsync ...
0
votes
0answers
19 views

security updates

I am using ubuntu14 in aws amazon to run my project on browser. But there is a major problem that I am facing. Every time when I login to the server using putty, I get security updates & upgrades ...
0
votes
1answer
23 views

How do you create a Bash Script for replacing text in a document, utilizing regular expressions? [closed]

Identical to this question: Find and replace text within a file using commands However I want an answer that utilizes regular expressions specifically. So in short: Using commandline; what command ...
-1
votes
0answers
22 views

script not working properly in crontab [duplicate]

I am trying to run a backup script. #!/bin/bash year=`date +"%Y"` date=`date +"%d"` month=`date +"%b"` monthful=`date +"%B"` mn=`date +"%m"` date1=`date +%_-d` b=`date +%_-m` cd ...
-1
votes
0answers
38 views

Cuttlefish #!/bin/bash not working 0.o

I was running Cuttlefish on Ubuntu 14.04 with 2 scripts to dim and un-dim my screen when AC power changes to battery and reversed. I reinstalled today and can't make the script dimming or un-dimming ...
2
votes
1answer
50 views

Find not removing files in folders through bash script

I'm very new in bash scripting and I'm really stuck on the find method from Ubuntu. I want to search in the folder /opt/ for all folders to see if they are older than a specific date. If they are ...