Tagged Questions

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

failed to execute '/bin/eject'

Recently we failed in searching campaign for a Modem Manager for my ZTE USB modem in Ubuntu 14.04 and since then, I am getting, in my Ubuntu starting messages (probably boot scripts), a bunch of ...
1
vote
2answers
98 views

Rename multiple files whose names include '*'

I have a set of files whose names contain the character *. For Example, a file name could be ***abcdef. I want to change this file name to 3_abcdef, replacing the * with the number of * that were ...
-1
votes
2answers
41 views

I want to create a small programm in linux

I want to create a script in linux that will create random numbers from 0 to 30.000 and save them in a text file. I want all the numbers to be in one line. I also want the numbers be through 1 to ...
0
votes
0answers
10 views

multicd.sh script problem with ubuntu 14.04.1

I wanted to create multi-boot DVD with ubuntu-14.04.1-desktop-amd64 and ubuntu-14.04.1-desktop-i386. I use multicd.sh script (multicd.tuxfamily.org) in linux OpenSuse and create a ISO with both Ubuntu ...
1
vote
1answer
24 views

How to create a script that will connect to a specific network

Using the integrated Network Manager, I created a new VPN Connection, called 'My VPN'. When I click it, it connects - great. Now I need to automate it a bit. Is it possible to write a script which ...
0
votes
0answers
38 views

Script problem at boot ubuntu

I have an application in C++ which show a ipcamera video when I send it a value by ethernet. I want that the application start at boot in automatic way. This is my script: #!/bin/sh ...
2
votes
1answer
20 views

Daemon not running on boot

On an Ubuntu (14.04) VM, I have a simple node server that I want to run on startup. The following script works when invoked just as ./noderoot start, but isn't running on startup. The script is ...
0
votes
1answer
27 views

Script problem Ubuntu

I am working under ubuntu 14.0.4, I have an application which I did in C++. This program only receives ethernet values, and show up an Ipcamera video which depends of the receives value. I am using ...
0
votes
0answers
12 views

How to autorun a script as root just after the user's encrypted home directory has become mounted on headless server?

There is a problem with ecryptfs that it heavily limits the maximal filename length. To walkaround it I link most home subfolders to the external encrypted partition. The partition gets mounted just ...
0
votes
0answers
7 views

Rename and Resize Photos Script

I want to have an automated script run every day, it renames my photos to creation date and location, something like this 2014-09-Paris-001.jpg 2014-09-Paris-002.jpg etcetera and then resize a copy ...
1
vote
4answers
53 views

How Can I Run an Shell Script With .desktop Config File?

I am trying to run a shell script with a .desktop file but it doesn't seem to work, producing an error of There was an error launching the application at each attempt. I have the sh and .desktop files ...
0
votes
1answer
31 views

Run Script ubuntu 14.04 at boot

I am pretty new at scripting in Ubuntu. I have an application in C++ which uses OpenCV for Ipcamera video processing, I am working in Ubuntu 14.04. I am going to try to explain what I did: First I ...
0
votes
1answer
12 views

executing shell scripts

My help file states the following: When a script is executed from a local folder, all selected files will be pasted to the script as parameters. To execute a script on a file: Navigate to the desired ...
0
votes
2answers
55 views

How Can I Remove All Characters After a Certain Character Appears Twice Using Bash Scripting?

I have multiple files in a directory over 200 which I would like to rename by removing all other characters including the character and the rest after it appears twice. Example: One of the files in ...
0
votes
1answer
21 views

How to automatically mute on headphones disconnect? Or how to tap bash script to system event listener?

My life would be easier if Ubuntu was muting the sound each time I disconnect the headphones, since every time surrounding is different (example day / night), but the same output volume. I may ...
0
votes
2answers
50 views

How to replace a string of text with input from another file

I am working on a script to configure a server. Basically the script installs several services and copies configuration files in to place. I would like to replace the username in one of the ...
1
vote
1answer
70 views

run script after wake up

I have a Toshiba notebook(Toshiba c50d a-133) and problems after waking up. When I close the lid Ubuntu go to sleep mode. After opening, it wakeup, but sometimes mouse and keyboard show no Function. ...
0
votes
2answers
54 views

How to write a script which automatically presses `Fn + F3` button on my keyboard

I am struggling with screen brightness reset issues . It resets to 100% on every reboot. I have tried searching for solutions but none of them worked[including xbacklight ]. Since I can change ...
0
votes
1answer
29 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 ...
2
votes
1answer
85 views
+50

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

script convert files using dos2unix [on hold]

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
37 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
28 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
26 views

Reading Cronjob Output [duplicate]

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
65 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
15 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
7 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
51 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
76 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 ...
2
votes
3answers
249 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
30 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
19 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
52 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
35 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
209 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
64 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
33 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
35 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
43 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
67 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
30 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
40 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
72 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
28 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
47 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
175 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
37 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
28 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 ...