Bash is the shell used in Ubuntu's command-line interface.

learn more… | top users | synonyms (1)

0
votes
1answer
34 views

Script not running on resume/wakeup in Ubuntu

I have a script named 999_thaw_flash.sh in my /etc/pm/sleep.d The script follows like this :- export DISPLAY=:0 #!/bin/bash case "{$1}" in resume|thaw) lynx --dump link1 >> file1 lynx --...
1
vote
1answer
50 views

How can I make bash completion (tab auto-complete) match a particular command first?

I develop using Python on Ubuntu and so I use the workon command (from virtualenvwrapper) a lot to switch virtualenvs. Previously, workon was the first tab-completion match for "wo", so I could type ...
0
votes
0answers
52 views

Bash Script Not Working

I hope this is an easy answer Problems: I placed the following bash script called learn-address.sh in the following folder: vi /etc/openvpn/netem/learn-address.sh Added the following two lines to ...
1
vote
0answers
15 views

Open Terminal Shows : bash: alias: =: not found How to remove? [duplicate]

when i open my terminal it shows: bash: alias: osmall: not found bash: alias: =: not found bash: alias: cd: not found bash: alias: /var/www/html/OpenSupermall/: not found bash: alias: /var/www/html/...
0
votes
0answers
66 views

I have a problem with a loop in a script. How I can create a loop in a loop?

I'm doing a script for improving my scripting capacities, but I can't make a loop work, how I can fix it? Here's the script: As far as my knowledge go, the problem is in the below script: read op2; ...
1
vote
3answers
46 views

Rearrange the components of filenames for a group of files

I have a group of photo files that are named: ddmmyyyyxxxx.jpg (xxxx is just a sequence number) that I am trying to search but sadly no results, is to rename the filename to yyyy-mm-dd-xxxx.jpg. All ...
0
votes
0answers
16 views

reboot bash script for Beaglebone stops without finishing

For the longest time I used the following script: #!/bin/bash echo 'start' && ssh -o 'StrictHostKeyChecking no' root@192.168.7.2 'reboot'&& echo 'end' which echos "start" and also ...
1
vote
2answers
17 views

How should I set enviroment variables at GNOME login - not shell?

Ubuntu 12.04, GNOME Classic I have a script that I execute from /etc/bash.bashrc. Whenever I open a terminal, it sets some environment variables needed for my applications to run. I execute them from ...
0
votes
1answer
34 views

regular expressions / pattern matching on ubuntu command line

I notice a lot of bash utilities like ls, cp, mv, grep use regular expressions and pattern matching. For instance symbols like * [] {} etc. However, I find this to be different in some regard to ...
0
votes
1answer
61 views

sed: no input file / permission denied

I get a weird error when I run 2 almost identical scripts and I don't get the difference. When I run this script things go well: #!/bin/bash sed -i 's/^\(\s*\)sudo\s*/\1/g' /home/d/Desktop/Sandberg/...
0
votes
0answers
11 views

Scripts for disabling and enabling proxys are not working [duplicate]

I have following scripts for enabling and disabling proxys, but looks like they are not working. Do you guys know what might the problem be? enableProxy.sh #!/bin/bash export http_proxy="http://...
0
votes
1answer
72 views

Copy files from list of files and create necessary directory structure

I have a file list like below: app/code/community/Company/Module/Block/Adminhtml/BlockAlias.php app/code/community/Company/Module/Block/Adminhtml/BlockAlias/Edit.php app/code/community/Company/Module/...
8
votes
5answers
668 views

How to detect the number of opened terminals by the user

I am using Ubuntu and can manually change the bash shell prompt color to green using export PS1="\e[0;32m[\u@\h \W]\$ \e[m" However, I want the shell prompt color to automatically change whenever ...
0
votes
1answer
29 views

Installing Ruby On Rails shows errors on line 168 [closed]

I am trying to install ruby on rails on my me elementary OS 0.3.2 Freya. and now i am seeing the following errors on my terminal. even if when i restart the terminal the errors shows on the first ...
0
votes
0answers
25 views

Why is xinetd so slow?

I'm using an aws ubuntu distro (small size) to receive webhooks from github. The basic setup is to use xinetd to kick off a small bash script to read the post data in from github. If it's a ...
-1
votes
1answer
30 views

bashcript that opens another bashscript [duplicate]

I have a script that opens terminal and list directories. My problem is that the second terminal ls the files but disapears in a flash. how can i make it not disappear? i have tried sleep but not ...
0
votes
0answers
22 views

Trickle and Trickles Not Working

I'm trying to limit UPLOAD rates on my machine to 1 or 2 MB, It bottles at around 10 so want to make sure there is enough left over. I've tried within my script to call my command with trickle limits:...
1
vote
1answer
221 views

How to change Terminal Title in ubuntu 16.04

When I was using ubuntu 14.04, it's easy to set title. Just press F2 or move mouse to top menu. But there is no menu on ubuntu 16.04 and press F2 can't change the title. What should I do?
0
votes
0answers
20 views

How do I make games 'public' in Ubuntu Server?

I'm fairly new. I thought I'd mess with paths and permissions and so forth by doing something pretty straightforward. I have the Infocom z-machine interpreter frotz installed and working. z-machine ...
1
vote
0answers
38 views

Terminal has lost its colours

In terminal, the usual user@machineisn't green/blue as usual. Instead is is just white like the rest of the text. If I ssh into my server however, the colours are the same. Perhaps I've accidentally ...
0
votes
0answers
32 views

Restart systemd system unit from bash script? [duplicate]

Background: I'm running two node servers as systemd system units. Both units run under a user account (not root). One of them is the production server, the other exposes a webservice which invokes a ...
0
votes
1answer
25 views

Write result for each pair of files in directory to file

I would like to execute command on each pair of files in directory and write a result to a file, I would like to get matrix NxN of results. I've started: for file1 in some_directory/*.txt; do ...
0
votes
1answer
27 views

Question about bash script

I am using Ubuntu 16.04. I have written a basic bash file which automatically logs me into my SSH server. Is there a way to add a message which says "Connection failed" if SSH can't reach the server? ...
0
votes
1answer
12 views

Removing Duplicates

I have 2 folders in this situation, /ParentFolder/FolderName/Files.mp4 and /Mount/FolderName/Files.mp4. In essence anything in /ParentFolder needs to replace any folders with the same name in /mount. ...
1
vote
0answers
29 views

Why might this “reboot on ping fail” script not be working?

I have an unresolved problem with my vps falling off the network. There's no reply and the webhost have no idea, so I thought this bash script should work #!/bin/sh ping -c5 8.8.8.8 if [ $? -eq 0 ]; ...
0
votes
2answers
42 views

Bash scripting problem on echo -ing the current working directory

I have this code: #!/bin/bash #clear screen clear # Ask for name of directory to create echo "Please enter a directory name" echo "that you wish to create" read dir1 # create directory mkdir $...
0
votes
0answers
63 views

Copy/move a list of files to a directory while maintaining directory structure

I have Ubuntu 14.04 os installed in my system. Now I need to create a script for copying/moving a list of files and directories of a Magento module to another main parent folder along with ...
0
votes
1answer
20 views

At command with installed programs

I am trying to test at in 15.04. So far, nothing has been printed to terminal or any programs run echo "test" | at now + 1 min ls -l | at now + 1 min What am I missing?
3
votes
2answers
30 views

set command with no arguments

I was looking for env to display all the environment variables. I happened to issue the command set and it seems to "cat" a script to the console. Why does this happen? This reference page does not ...
3
votes
1answer
57 views

Script to convert .wma to .mp3 command not found [duplicate]

I am using a script called conv-script that I found on AskUbuntu here. It looks like this #!/bin/sh readarray -t files < wma-files.txt for file in "${files[@]}"; do out=${file%.wma}.mp3 ...
0
votes
0answers
10 views

how do i get verbose output from lpr?

Im troubleshooting a printer, and I want lpr to give me verbose output. This web page made is seem likely, a "-V" option, but the man pages have no option, and it doesn't work. How do i get verbose ...
-4
votes
1answer
107 views

Windows 10 UBUNTU bash

I am having multiple problems getting UBUNTU to work properly.. I am getting pages of errors after running apt-get install -f the errors end with: 6b39-1.13.11-0ubuntu0.14.04.1); however: Package ...
1
vote
2answers
83 views

Run Shell Script inside tmux

Why after running tmux on a remote server via ssh, program works; but after detaching sessions, it returns 404? This is a Go(golang) program, a http server listening on a port, behind a nginx reverse ...
0
votes
1answer
21 views

ctrl + r not picking up the latest commands in history

when I enterl ctrl + r and enter a search term it goes back in distant history and never finds the commands that I most recently typed that has this keyword
0
votes
0answers
29 views

Errors logs for MAAS commissioning?

I am trying to get some things to work with MAAS. I have hits some brick walls (hard!!), but in the end you will learn right ;) So what I want to do is to make MAAS start the machine with etherwake. ...
0
votes
1answer
44 views

Permission to my ~/.bashrc denied

I have an issue with accessing my ~/.bashrc file. I did and obtained the following: yuve@YuveSys:~$ ~/.bashrc -bash: /home/yuve/.bashrc: Permission denied yuve@YuveSys:~$ sudo su root@YuveSys:/home/...
0
votes
2answers
23 views

variable expansion in single quote

I have have string in single quotes. Inside which I want to insert a variable and expand it. I know in bash variable expansion works with double quotes only. But I'm still not able to make it work. e....
1
vote
1answer
70 views

Problems with Ubuntu via Crouton on Chromebook

I have a few problems and questions. First of all I am using a brandnew Chromebook Acer R11 and used this guide to install Ubuntu next to Chrome OS: http://chromebookblog.de/ubuntu-auf-dem-chromebook-...
0
votes
2answers
35 views

bash script to run a second command with select output from first command as variable

I'd like to get the output of the second command with the 7 character PSI domain (00:01.0) as a variable. How can I write a bash script to do this? jeff@jeff-probook:/$ lspci | grep VGA 00:01.0 ...
3
votes
2answers
204 views

Invalid bash variable assignment

I have two scripts namely variables.sh and install.sh. When I execute bash install.sh, the .config file is not properly created. The export CC line doesn't adds BUILD64 variable entry into it and ...
0
votes
0answers
108 views

Need script to logout after 20 minute idle time and then auto login

I have a public internet terminal at my workplace. Often, users will simply walk away from the machine without logging out (of email, facebook, etc.) -- I want to make the end-user experience more ...
0
votes
3answers
30 views

Can't use --help with printf

Most programs print usage and quit with "--help". But I can't get it to work with printf: $ printf --help bash: printf: --: invalid option printf: usage: printf [-v var] format [arguments] man 1 ...
0
votes
0answers
9 views

What is the meaning of the highlighting in the terminal? [duplicate]

I use ubuntu for about half a year, but I'm still a newbie regarding the terminal. So could someone explain me what the exact meaning of the highlightings in the terminal is? I only know the ...
1
vote
1answer
21 views

Start script to launch repeating child scripts?

I'm trying to get this looping script to run at boot. If I add '#! /bin/bash", I can start it automatically from profile startup but then I can't get the child windows to behave properly. - What am I ...
0
votes
0answers
26 views

Executing commands in an elevated bash process by writing to the standard input of its parent process

I have a simple bash script 'bash.sh' that starts another bash instance using pkexec. #!/bin/bash bash -c 'pkexec bash' When executed this shows a prompt for the user to enter their password. The ...
0
votes
1answer
21 views

Difference between bash-shell and ksh-shell by using while with read - what can I do in bash for the same response as in ksh?

I have two scripts: in bash #!/bin/bash H_VARIABLE=empty echo "Zeile1 Zeile2" | while read satz do H_VARIABLE="$H_VARIABLE $satz" done echo H_VARIABLE=$H_VARIABLE Result: H_VARIABLE=...
0
votes
0answers
17 views

(standard_in) 1: parse error with comparing decimals

I keep getting a parse error and have tried to check the code but I can't see what could be wrong? #!/bin/bash echo -n "Please enter first: " read first echo -n "Please enter second: " read second ...
0
votes
0answers
27 views

bash: [file]: No such file or directory

I have access to a cluster with six machines (wien0, wien1,..wien6) with /home/yhattori directory shared. I've installed a program (gaussian03) in wien6 machine at /home/yhattori/g03 directory where ...
0
votes
0answers
26 views

Edit /etc/environment via Command Line [duplicate]

I am using Ubuntu Server 14.04 and I would like to be able to edit the /etc/environment file via the command line to append the file with environment variables. This append operation is going inside ...