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

learn more… | top users | synonyms (1)

0
votes
1answer
29 views

Create global shell command for LightTable

Trying to create a global command to launch lighttable (the editor) version 0.8.0 Initially I tried it the i thought easy way and moved the extracted lighttable folder to /opt and then created a ...
1
vote
2answers
211 views

Compare the first field of each line whose first field is “2000” till a different field is found

My goal is to compare the first field of each line whose first field is "2000" till I find a different field. Let say the different field is located in line number 6, as in the provided example; in ...
1
vote
1answer
43 views

script not working

I'm very new to linux, I'm trying to get names of .ogg files from a text file and take mp3 files of directory music and rename and move them to a different directory with the name of that file line by ...
0
votes
1answer
33 views

Shell very slow to load - Ubuntu 14.04

Opening my terminal (ctrl+alt+t), it takes a long time to load my prompt. I had read here regarding the same issue but none of their solutions helped me. On opening the terminal, it takes around 4-5 ...
0
votes
2answers
56 views

SSH Key with user and root with shell script

Is it possible to ssh login to a server as a user with shell access and then change to root user both with the help of ssh key using a bash script?
0
votes
1answer
29 views

ssh session (from ubuntu to centos) prompt delayed after a while

I do a lot of work on a centos (7.2) machine into which i ssh from an ubuntu (14.04) machine. Everything works fine, almost. But after a while on the remote, usually a couple of minutes, I have to ...
1
vote
0answers
11 views

Record date when command was executed in the terminal? [duplicate]

bash_history lists only the previous commands executed. Is it possible to record the times ie. date when they were executed?
0
votes
1answer
42 views

How to use the Command-line Parameters to select then change a group of filenames

I have been using a simple shell script placed in my user/.bin folder; Its job is very simple, copy specified files $1 and rename to $2; at least I had thought it to be that simple ... The situation ...
1
vote
0answers
23 views

Inputting a text to an executable file the moment it's executed

i am bad at choosing titles but my problem is that I have an executable file that returns a value when i type the word password in it using the terminal, but the problem is the file require you to ...
1
vote
2answers
41 views

Pass Variable Value as Argument to Command

I want to let xdotool type the current date automatically and wrote this bash script as a first try: #!/bin/bash STR="Hello World!" xdotool type $STR Unfortunately, it already fails at ...
0
votes
1answer
15 views

How do i change my locale safely?

1) How do I check which locales are supported on my system? 2) How do I change my locale safely? 3) What are some of the side-effects of doing this? Reason I'm asking these questions is because I ...
1
vote
1answer
32 views

How to delete duplicate music files where at least one version is .flac

I had to consolidate several music directories, and have ended up with many duplicate files. In instances where one is a .flac, I'd like to get rid of the dupes and keep the .flac. I'd like to only ...
-1
votes
1answer
42 views

./configure not found on new installation of ubuntu

I am quite unexperienced with ubuntu. As I am now trying to install nodejs via tar.gz package I dont get the ./configure to work. As you may read anywhere, an installation consists basicly of these ...
3
votes
1answer
61 views

Error: “The value for the SHELL variable was not found the /etc/shells file” when running `pkexec`

On Ubuntu 14.04, I am getting the error "The value for the SHELL variable was not found the /etc/shells file" when running pkexec to run a script. Most likely this error started after I removed the ...
1
vote
1answer
31 views

Rename files owned by user who runs the script

I have this script that renames files specifically. #!/bin/bash #sh j echo "for rename press [y]" echo "Or any key to continue" find . -name "*string1*" -ok rename -v -- ...
1
vote
3answers
38 views

Can't execute this read statements correctly?

Read a b c Echo $a $b $ c It takes only value of a. What should I do , so that my first code may be run properly?
0
votes
1answer
28 views

decimal precision

I have a variable a=1.349804687500000093e-02. I want to have a in 5 digit precision. I tried to use the following command which prints the variable as I want but does not save it. ...
1
vote
0answers
23 views

Sort file into directories base on their extension [duplicate]

I just recovered more than 2 Million files using PhotoRect, the files in the recovery folder contain more than 2 Thousand folder containing random files extension . It would be impossible if I sort ...
2
votes
1answer
44 views

Installation of software fail

now show this bash: /home/jonathan/.bashrc: línea 168: error sintáctico cerca del elemento inesperado `export' bash: /home/jonathan/.bashrc: línea 168: `esac export PATH=$HOME/xdman:$PATH' This is ...
0
votes
1answer
45 views

Help debugging my bash script

I wrote a script (my first one) that aims to replace an IP address in a bind configfile whenever it detects that the IP that appears in the file is not the same as the current external IP. I have my ...
2
votes
1answer
65 views

Help, ubuntu server 14.04 crontab cannot run my database backup script, but other simple script is ok

Hi All Ubuntu Server Experts I need help in cracking this crontab problem. So, I made a change in /etc/crontab to run a system script for database backup purpose. The crontab does not seems to run my ...
5
votes
1answer
19 views

zsh suggesting what packages to install [duplicate]

I love using zsh but there is one feature that bash has that I miss. It is this one: ➜ ~ bash dbugger@mercury:~$ man2html The program 'man2html' is currently not installed. You can install it by ...
2
votes
0answers
54 views

startx not working

I am attempting to install Ubuntu on an ASUS T100. However, when I boot it manually from GRUB, it crashes into an intramfs shell. I am able to mount the filesystem from the intramfs ASH shell and ...
1
vote
2answers
192 views

Can't remove composer via terminal

I use Ubuntu 15.10 and I am trying to remove Composer, a common PHP dependecy manager. I remove it along with LAMP to reinstall them all for exercise (I am very new to Linux). It seems that even ...
0
votes
3answers
103 views

Steam won't launch properly without terminal command

I noticed Steam wouldn't run when I installed it, shortly after installing ubuntu 15.10. So, I ran the command: LD_PRELOAD='/usr/$LIB/libstdc++.so.6' DISPLAY=:0 steam And it worked fine. It ...
0
votes
0answers
5 views

Email Notification for Ubuntu Auto-mount USB Drives

I have Ubuntu 14.04.2 LTS server with attached 1TB USB Hard Drive and I am looking for that a script or a tool for Ubuntu Server to check the USB drive's status and automatically send a status to ...
3
votes
1answer
34 views

Mysterious behavior of echo command

When we need to use escape sequence characters with echo command we must use the -e option. Like echo -e "Enter your name : \c" But when we include such kind of statements inside a shell program ...
0
votes
0answers
24 views

How to keep read value after break [duplicate]

Evening, I am trying to have the mysqlpass entry stay throughout the script, without the break getting rid of it. But I can't figure out how. while true; do read -p "Password for MySQL " ...
0
votes
0answers
22 views

W: Failed to fetch, 508 Loop Detected. While installing the software on linux

I uploaded all my content on web(hostinger's free hosting account) for my Linux software. So that, after adding key to system and repository to /etc/apt/sources.list file, I could install it by simply ...
0
votes
1answer
41 views

How can I write to stderr so that stderred colours it red?

For background, I previously asked this question. I am using stderred to turn stderr text in red when diplayed on a terminal. This works nicely on most occasions, more specifically for what appear ...
0
votes
1answer
32 views

How to reset the PATH value for bash shell

I tried installing hadoop and I no longer need stuff from it. When launching shell , it gives the following and many commands are unrecognized now , how do I reset it to default ? bash: export: ...
1
vote
2answers
50 views

dig times out while host works

I'm currently running a relatively fresh installation of Ubuntu GNOME 15.10 on a notebook connected via Wifi. Other network interfaces are present (mobile broadband, ethernet) but apart from the lo ...
0
votes
2answers
27 views

cron.hourly sendmail errors even though my scripts do not involve sending mail [duplicate]

I have only one very simple shell script in /etc/hourly.cron. It just controls a Twitter bot- it runs a short python script that posts to Twitter using tweepy. It does not involve email or any ...
1
vote
3answers
43 views

How do I find all custom-created symbolic links in the entire system?

I've created several symbolic links in different places. I can't really recall where each one of them is in the system and I've already removed programs they are associated with. Is there a script / ...
0
votes
1answer
23 views

Can you configure postfix in ubuntu to send a automated email when a user submits php webform?

How would you write a bash script to take a users informations from the php webform and email the user saved on the server using postfix when they submit the form? The users saved on the server should ...
0
votes
0answers
49 views

conditional binary operator expected

This is on Ubuntu 14.04 I am running a provided script and one of the functions is: function isset { [[ -v "$1" ]] } however I am getting the following error: bash: conditional binary ...
0
votes
1answer
49 views

cannot access ubuntu after restart chromebook [closed]

I downloaded Ubuntu on my Samsung Chromebook 2, and I really enjoy it! I shut down my Chromebook, and I tried the command Alt + Ctrl + Forward like I did before I shut it off, and It did not work. I ...
0
votes
2answers
35 views

Is .bashrc correctly setting the graphical terminal title?

From the default .bashrc is this: if [ "$color_prompt" = yes ]; then PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' else ...
-1
votes
1answer
26 views

rename + ask before proceed

I need the program to find filename with certain string, then rename it. That part is working. But i need to add some user input that will ask the user before every renaming if he wants to rename the ...
0
votes
0answers
20 views

Gambas autostart issue in Xubuntu

Hi I have a problem to add my own Gambas 3 application to startup. Tried everything added to Sessiong and Startup in Settings. Added to .profile, .bash_profile and nothing. I tried different apps ...
5
votes
2answers
389 views

Bash script — store `curl` output in variable, then format against string in variable

I was hoping to curl data into a shell script variable, then use cat or awk to operate on that variable as if it was a file. Is this possible, or is there a workaround? Do I have to save the curl ...
0
votes
0answers
34 views

How to create a symlink without expanding variable?

I'm trying to create a symlink that links /root/.gtkrc-2.0.mine to /home/$USER/.gtkrc-2.0.mine. Whenever I try to run the following, the variable expands, so if I copied it to another computer, it ...
3
votes
2answers
59 views

Simple Zenity script?

I am trying to make a simple graphical Zenity+Bash script that will list all the icon themes available in /usr/share/icons, then let the user select one and click "OK" to replace ...
1
vote
1answer
21 views

How to “deep stop” a process? [duplicate]

I have a long running python script that keeps getting interrupted by battery issues or my own stupidity. I can use (CTRL-Z) to stop the process and then fg to restart it, but as far as I can tell ...
3
votes
1answer
56 views

Running bash script in detached screen

I could use a little help on this one. I am a novice scripter at best. I am trying to write a bash script to connect to my multiple openvpn sites. I am trying to write the script to open in a ...
1
vote
2answers
36 views

line 42: syntax error: unexpected end of file [closed]

I'm relatively new to bash scripting so bare with me but I need some help. I feel like i have all the right stuff there but it ain't quite going. I'm attempting to make a simply security log in the ...
7
votes
3answers
175 views

Same script opened in three different ways produces three different results. Why? [duplicate]

I have a sample script (credit goes to kos): #!/bin/bash cat <(cat /etc/lsb-release) I save this script as somename.sh in my home directory. Now, I try to open this file in three different ...
1
vote
0answers
34 views

crontab run sequentially

I have to run crontab in xvfb display mode forever when the system restarts...below is crontab code.... @reboot nohup Xvfb :1 -screen 0 1024x768x24 & export DISPLAY=":1" @reboot /usr/bin/forever ...
1
vote
1answer
21 views

how to handle unwanted exiting of a command and its output in bash script

I made a one liner script to auto hide a specific window when mouse is not hover over that window. It gets mouse position and geometry of the window and its position (topleftx,toplefty), I added its ...
1
vote
3answers
42 views

Extract Strings from an HTML file

I need an sh script will get text from an html file I download the file with wget website.com/link_123456789 -O 'testfile.txt' the full contents of that file are located at this pastebin But you ...