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

learn more… | top users | synonyms (1)

1
vote
1answer
13 views

For loop syntax bash script

Is there a way we can implement some thing like this in bash script ? pureips="10.3.1.111 10.3.1.112 10.3.1.114"; pureservers="a b c"; for ip,server in $pureips,$pureservers; do echo "$server | ...
0
votes
1answer
24 views

Help decoding Base64 using base64 -d

**** This post links to Windows-Based malware executables!!! DO NOT EXECUTE DECODED SAMPLE **** I hope I can post this here without having it pulled down. I have 2 seemingly identical base64 ...
1
vote
0answers
17 views

How can I pass command line arguments to a script through Dash? (14.04)

I recently asked this question about adding a shell script to Dash: In 14.04 how do I run a bash script I wrote without opening a terminal? It worked perfectly. Follow-up question: How can I ...
1
vote
2answers
32 views

script convert files using dos2unix

I want to create a script to monitorize my local folder and every time it receives a file starting with frm*, to convert it using dos2unix. This script is always running and keeps converting the same ...
0
votes
2answers
20 views

execute shell script from desktop in xfce

At first I just made a link to the .sh file on my desktop which failed to execute by double click. Then I've read about .desktop files and made one still to no avail. The program I want to run is a ...
1
vote
1answer
18 views

how to make scripts which will run on installation of apt package

I have created a bash script which will store some data into a mysql database. Then I have created deb file with that script and made it available for installation by creating local apt repository. ...
1
vote
0answers
22 views

Reading Cronjob Output

I have a task setup to run on my cronjob where I need to read the output. What I need from the output is the starting character (let's say A) and the ending character (let's say Z). A helps me ...
1
vote
2answers
53 views

Cannot run bash script from crontab when it works from command line bash

I have a strange problem of being to able to run a bash script from commandline but not from the crontab entry for root. I am running Ubuntu 12.04. * * * * 1-5 root ...
-1
votes
0answers
10 views

issues installing uhd in ubunbu 14.04

hello I wanted to know if somebody could help me get around the problem. the problem is that once I have installed pybombs whenever I try to download anything via the app_store.py this error message ...
0
votes
0answers
6 views

How to: autocreation of system performance / health log?

I want my system to create file with a history entries filled by: exact time CPU, GPU, HDD temperatures network total up/down bytes RAM and swap % usage Less important: CPU, GPU, HDD loads ...
0
votes
1answer
43 views

Add custom script to PATH

I know there are quite some answers about that, but still could not make my way around it. I read all this and tried to follow the example under System-wide environment variables (for my case of ...
1
vote
1answer
55 views

In 14.04 how do I run a bash script I wrote without opening a terminal?

I use terminal a lot. I wrote a script and have it in ~/blah/script.sh now. How can I run the script from Unity (Dash?)? A long time ago I would have used ALT-F2 and typed my command, but that ...
0
votes
0answers
37 views

What is an argument? [on hold]

I need to add a new argument containing this "The new arguement will be a path for a folder you want backed up. Your script will replace each instance of /var with that arguement. You should be able ...
2
votes
3answers
245 views

Batch rename — multiple image types

I have a large number of images that I copied from a failing external hard drive. All of the images are fine and have no corruption, but oddly a large number of them are now missing extensions. The ...
0
votes
0answers
22 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, ...
0
votes
1answer
18 views

Weechat error: unkown command “script” (type /help for help)

While trying to set an autoloading python script in ubuntu, I received the error listed in the title. A google search returned no similar issues and when I type /help scriptthe output returns: No ...
1
vote
2answers
51 views

gibberish command not found on bash terminal startup

I have run across an issue that I just cannot seem to figure out. When I start my terminal in ubuntu (14.04) I get the message sdfsdfsdi: command not found As you can see it just looks like ...
2
votes
0answers
30 views

Port redirection for a specific (dynamic) IP using iptables script

What I want: Incoming TCP and UDP connections on port 900 from the resolving IP address of myip.dyndns.org (dynamic IP) should redirect to port 5050 on the local machine. All other IP addresses ...
1
vote
2answers
200 views

Script doesn't work when it is run using '#!/bin/sh'

I have a script that use shebang : #!/bin/sh, but when I run it in my Ubuntu 14.04 terminal, it doesn't work and it says that some lines has unexpected operator. My friend in another computer could ...
1
vote
2answers
56 views

How to run commands from a bash file the way they run from terminal?

Sorry for my probably very naive question. What I mean is: how to create an executable script/bash file that would run more complex commands, commands which must normally be put in a terminal? ...
0
votes
1answer
20 views

Where does the output of a script that was run at startup go? [duplicate]

I have a script which is run at startup from rc.local, I don't redirect the output anywhere. When I first wrote it, I ran it in a shell, it worked as I expected and continually poured characters out ...
0
votes
1answer
32 views

unable to execute .sh scripts - only on one pc

This is an unusual problem for me - what would cause one pc to suddenly be unable to execute an install.sh script, yet two other pcs with the same OS have no problem doing so? I get various errors ...
0
votes
1answer
31 views

Starting a script in a Desktop icon

I have the following .desktop file on my Desktop: [Desktop Entry] Encoding=UTF-8 Name=Robomongo Comment=Launch Robomongo Exec=/usr/local/robomongo-0.8.4-i386/bin/robomongo.sh ...
1
vote
1answer
38 views

Commands not executing in shell script run by udev

I'm having trouble using udev to run a shell script that backs up my hard drives to an external drive whenever the external drive is connected via USB. Everything works except the actual call to ...
1
vote
2answers
65 views

“mv” versus “cp” in a bash script [closed]

I am attempting to make a script that will be able to load up some settings and files to a board. Basically I will plus a flash drive into the board click on the script. The script will then ...
0
votes
1answer
26 views

Ubuntu bash if lessthan else condition returning error [: -lt: argument expected

I am doing the following script to know if profit or loss from entered selling price and cost price as; echo enter selling price read sprice echo enter costprice read cprice if [ $sprice -lt $cp ] ...
0
votes
1answer
37 views

Script needed to copy data to a mounted storage device

I have a 1 TB HDD. And have problems copying data to it whenever i update it on my Ubuntu Machine.Can anybody suggest me how to make a script for Ubuntu such that whenever i mount it copy the newly ...
1
vote
3answers
69 views

Sort videos by bitrate

I have a folder with some 300 videos. I want to sort these by their video bitrate. I use a command 'mediainfo' to obtain the bitrate info of a file . Is it possible to write a script (possibly in ...
0
votes
1answer
23 views

git push script, only if difference

I've found some nice questions illustrating how one would write a script automating git push/pull with cron here and here, but I want to elaborate on that slightly. I only want to push/pull if there ...
2
votes
1answer
46 views

Trouble with simple script :(

Could someone please tell me why this script doesn't run correctly. Seems to be a problem with the if statement as i keep getting the error: /home/sinttx/Development/backup/ddbackup.sh: line 18: ...
2
votes
2answers
172 views

Cron Job Creation

Okay, so I have had a quick look at the answers posted on this question and re-formulated my cron job. So, let me break this down as clear as I am able to: PC/OS | Shell Info I am currently running ...
1
vote
1answer
34 views

How to create your own commands that can be used anywhere [duplicate]

I am new to linux, and I am learning bash scripting at the moment. I was wondering how I would save my script as a command and then be able to call that command anywhere in the terminal. So i could ...
1
vote
1answer
24 views

why my bash script only outputs one line on echoing awk variable

Anyone can probably tell I'm new at scripting and have tried doing as much homewaork before posting here. I have what I think is a simple script parsing out DNS zone file for IP and unique domain ...
0
votes
0answers
8 views

writing a pre-uninstall script for my ppa

I have implemented my personal ppa for a python script, the program is working well. Now, I would like to write a pre-uninstall script to replace the .bak files, but I don't know how to place it in ...
1
vote
1answer
20 views

One time “firmware” upgrade script

I was wondering how you could make a script so that on first boot it changes files to a specific parameters? So it would be like if I just installed a fresh kernel. I want to run a script once and ...
3
votes
3answers
82 views

How do I create a single-execution Upstart job guaranteed to complete before two other jobs begin?

How does one write an Upstart task that is guaranteed to run only once after each startup but is also guaranteed to run to completion before either one of at least two other jobs start running. I do ...
0
votes
2answers
48 views

After performing apt-get dist-upgrade Perl scripts will no longer ignore invalid SSL certificates on 14.04

Good morning all, Last week I decided to run the commands to upgrade packages on my 14.04 Server to ensure that I was patched for the recently found Bash vulnerabilties. Per the info here ...
2
votes
2answers
36 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 ...
0
votes
1answer
35 views

Need Help Improving Script

I have a group of folders (L1N-L5N), in which I want to copy from my /home/michael/documents/XXX to my Dropbox folder. At present, I have used the following script: #!/bin/sh cp -ra ...
0
votes
0answers
36 views

rtorrent multiple commands after download finish

I cannot get two commands to work after a download is finished in rtorrent. First I want the completed files to move to another folder which works fine, but then I cannot get it to fire the second ...
0
votes
1answer
54 views

Cron job daily not running

I'm having trouble with setting a cron job to run daily when I enter the script to /etc/cron.daily when I put it there it doesn't run at all like it should be doing. I setup a script so that it can ...
1
vote
2answers
81 views

Loop through all folders and executing script

I have a bash script install.sh in my current directory and I have a directory apps which contains multiple directories. I want to loop through these sub directories in app folder and execute some ...
1
vote
0answers
50 views

I sudo'd a bash script, full of sudo apt-get install applicationname commands, and now my programs won't run

I sudo'd a bash script, full of sudo apt-get install applicationname commands, and now my programs won't run, unless they are ran as sudo (BAD IDEA!) How do I fix this issue?
2
votes
2answers
46 views

Ubuntu equivalent of CentOS success / failure

A lot of services in CentOS look like this (except green and red, respectively): $ sudo service blah start Starting blah: [ OK ] $ sudo service notrunning stop Stopping notrunning: ...
0
votes
1answer
31 views

xinput - no effect at startup

I have a script that uses xinput to slow down the mouse which works perfectly when run on the command line. So I create and run it from ./config/autostart/fixmouse.desktop, It runs at X startup with ...
0
votes
2answers
36 views

Problem with bash script [duplicate]

I have a little problem with a script of mine. I execute a command in background using sudo and I try to retrieve the PID of the command in a variable. the code is the following: #!/bin/bash sudo ...
0
votes
1answer
19 views

Unexpected interruption in Ubuntu starup file

I got a problem with the upstart files of Ubuntu in /etc/init/. I am trying to run a process if it does not already exist. So I wrote a conf file and start with "start" The following two files are ...
0
votes
1answer
46 views

SH file not executing successfully

I am new in linux. Trying to run sh file which connects the server over FTP or VSFTPD and get some files. Here is my Script #!/bin/sh HOST='IP_ADDR' USER = 'user' PASS = 'password' FILE = ...
0
votes
4answers
77 views

How to open bash files with terminal? [duplicate]

I am new to Ubuntu and I just started learning bash. How can I open bash files through terminal?
0
votes
2answers
66 views

Rename files in subfolders with parent folder names

I have a main directory that has four folders f1, f2, f3 and f4 each of these folders has 10 folders, and each of these 10 folders ff1...ff10 has some .jpeg images with some names lets say image1.... ...