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

learn more… | top users | synonyms (1)

-1
votes
0answers
23 views

shellshock issue [duplicate]

I just learn that shellShock issue for Linux base system. I would like to know does it affect Ubuntu 14.04 LTS, if yes, are there any update for this? Your information and help is great appreciated, ...
5
votes
2answers
246 views

How to do: underline, bold, italic, strikethrough, color, background, and size in Gnome Terminal?

How to do: underline, bold, italic, strikethrough, and color in Gnome Terminal? Bold Italic u̲n̲d̲e̲r̲l̲i̲n̲e̲ s̶t̶r̶i̶k̶e̶ ̶i̶t̶ ̶l̶i̶k̶̶e̶ ̶i̶t̶s̶ ̶h̶o̶t Color background font < (its mono ...
0
votes
0answers
33 views

Bash Script for adding Keyboard Layout to available Layouts

I am writing a bash script to add a layout (Urdu as input language) to the available keyboard layouts. The current status is: script automatically detects the current layout, as a string. adds te ...
0
votes
0answers
68 views

How to make apt update everything with cron-apt?

For my 14.04 server, I've set up cron-apt to update every day at 4'o clock. Today I've reviewed /var/log/cron-apt/log to make sure it has updated bash to fix shellshock. And indeed, it has updated ...
-2
votes
0answers
46 views

I am getting error when open terminal

when I am opening terminal I am getting this error can you please help:- Command 'lesspipe' is available in the following places * /bin/lesspipe * /usr/bin/lesspipe The command could not be ...
1
vote
3answers
55 views

How to get list of all non-removable disk device names (SSD/HDD and SATA/IDE only)?

I need a list of all disk device names (not USB or CD ROM) in the following form DRIVES='sda sdb' so that I can loop through them in a bash script. Ideal solution would not have to install a special ...
5
votes
4answers
257 views

Redirect pipe output to the same file

Is there any short way to save the pipe output to the same file that it's processed. For example, this is what I am actually doing $ cat filename | sort | uniq > result $ rm -f filename $ mv ...
0
votes
1answer
213 views

shellshock vulnerability and super user

can shellshock vulnerability execute somehow commands with superuser permissions? And if yes, from where/how? It is possible to be executed commands from cgi yes, but is it possible to get executed ...
1
vote
1answer
1k views

How do I know if my system is vulnerable to the ShockShell vulnerability? [duplicate]

The recently discovered ShockShell vulnerability affects many Linux and Mac systems, because they are using the vulnerable BASH shell. How do I know if I am vulnerable to this attack and how do I ...
2
votes
2answers
229 views

CVE-2014-6271 over ssh example attack?

I've been reading about the CVE-2014-6271 bug on lots of pages, but I'm still not able to understand how exactly is it possible to exploit it over ssh. From all I've read, I couldn't find an example ...
1
vote
1answer
52 views

How To: Keep running script only when the network (internet connection) is idle?

I have a script (actually, a Rails application with a Sidekiq job queue system), which uploads pictures and albums to Flickr. This data is huge for my purposes (around 100GB), and the upload is slow ...
0
votes
0answers
203 views

How do I upgrade from 12.10 on a DigitalOcean droplet?

The recent ShellShock exploit has prompted me to upgrade my Ubuntu 12.10 server, as I cannot upgrade bash on it (I receive 404 errors on apt-get-update (somebody else with a similar issue)). I opened ...
1
vote
0answers
352 views

How to Patch for Shellshock [duplicate]

So, in light of this closed thread, and this article, how can we patch for the shellshock bug/exploit/vulnerability for currently supported Ubuntu versions? 13.10 and 14.04?
0
votes
0answers
99 views

How to resolve the bash bug in ubuntu? [duplicate]

There is a bash bug reported ,worse than Heartbleed.How to resolve this?Is there a package to install in ubuntu? Thanks ...
125
votes
5answers
87k views

What is the CVE-2014-6271 bash vulnerability (Shellshock) and how do I fix it?

Recently, there have been news going around regarding "CVE-2014-6271" (See USN-2362-1), which is a vulnerability in Bash. How do I know if I am affected by this, how can I fix it, and why should I ...
4
votes
2answers
3k views

CVE-2014-6271 bash patch trouble

I have a Ubuntu [EDIT] 12.04.4 LTS server that is vulnerable to the recent bash remote executable exploit. Ubuntu says they have released a patch here. I have run a sudo apt-get update && ...
0
votes
0answers
12 views

Get status of background process

Let's say I have started a process in the background: e.g. tar [...] | pv [...] & pv has the PID 1234 and normally reports it's progress to stdout. The job was started as a cronjob so there is ...
0
votes
1answer
28 views

echo “${txtred}Text${txtrst}” color not always working

I have a .sh file through terminal and I'm using echo "${txtred}Text${txtrst}" as a display of what's happening when running the script. But sometimes the color is not red, although I used {txtred}. I ...
0
votes
1answer
38 views

Script Not Running Properly On Server

I am having an issue with my webserver. I am testing it out on a new kernel build and it seems as if I can't get one certain part running on it. All of my scripts work except this one. Every file ...
0
votes
1answer
81 views

How do I use a shell command as a launcher shortcut? [duplicate]

The following command from terminal works perfectly: sh /home/flux/Downloads/TeamSpeak3-Client-linux_amd64/ts3client_runscript.sh How would I go about adding this as a shortcut, so I can open ...
3
votes
1answer
62 views

mkdir crashes bash

I'm trying to create a directory in my home directory but the shell itself keeps crashing. I have permission to write to the directory. I am able to create files in the directory via touch. I can ...
1
vote
1answer
61 views

script.sh run differently when manually opening terminal and when using .desktop launcher

I have a script file script1.sh as shown below: #!/usr/bin/env bash cd /home/userA/scripts . r1.sh when I manually open a terminal and run it using . script.sh it works fine. But when I created ...
1
vote
1answer
48 views

shell file opens terminal and run a sequence of commands in specific order

What I used to do is: Manually open a terminal instance to run the following commands and shell files Run PACKAGE_PATH=/home/userA/package1:/home/userA/package2:$PACKAGE_PAT‌​H run: cd ...
0
votes
1answer
45 views

feedingbottle/n”export: No such file or directory

I'm noob in linux, so i install feedingbottle, but then I open terminal showing this: bash: ...
1
vote
1answer
85 views

how to run command in an already opened terminal through a shell script

I'm running a shell script.sh which is supposed to open terminal and then run some commands in this opened terminal. What happens is that the terminal starts but the following commands are not ...
0
votes
1answer
30 views

Desktop Launcher executing a sequence of commands after opening a terminal

I've created a .desktop launcher as shown below which successfully opens terminal. What I want to do next is to run the following commands such as cd home/userA/scripts then ...
0
votes
0answers
13 views

How to truncate directory name in terminal? [duplicate]

Something like ../parent folder/current folder instead of 8 different directories as mine currently is when I'm accessing deep files.
-1
votes
1answer
64 views

At what time does bash scripts execute? [closed]

I would like to run a bash script at system startup. I read recently that some bash scripts are executed before logging in to a user account, others, after. Can I get some information on when bash ...
0
votes
0answers
38 views

Shell script loop stops by itself

I have two script files like this. execute.sh #!/bin/bash #259200seconds = 5 days end=$((SECONDS+432000)) x=0 cp /dev/null ~/kill_start.txt while [ $SECONDS -lt $end ] do [[ $(cat ...
1
vote
1answer
35 views

Copying files and folders with cp with shopt extglob - error is not a directory

I'm trying to copy files from a directory while excluding a folder and a file. My problem is that a get an error with shopt extglob activated. Here is my code: ...
0
votes
1answer
38 views

Run some shell files from another shell file in different location

I have 5 shell files in a specific locations on my ubuntu system. I have two users on this system userA which is the main user and userB. Currently I have to manually open a terminal using user userA ...
4
votes
4answers
1k views

Why is the output of _$ _ when executed on a terminal?

I have executed the following command sequence: $ now=$(date) $ echo _$now_ _ $ echo _ $now _ _ Mon Sep 22 09:53:44 IST 2014 _ Why is the output of _$now_ only _?
2
votes
1answer
131 views

Stopping a running script though another script file

I am new to shell scripts. Say, I start a script like this. This runs for 3 days. So, I will start the script remotely through ssh and then close my local terminal. start.sh end=$((SECONDS+259200)) ...
-1
votes
1answer
20 views

Redirected Output

I just used a command ls -l > ~/ls_output in my /usr/bin directory and I'm not sure what happened. The terminal accepted my command but I don't know what happened to the output or where it went. ...
-1
votes
1answer
134 views

Ubuntu 14.04 - Desktop icon is not running my BASH script

I have a simple script runme.sh which works when i run from terminal. #!/bin/bash chromium-browser "https://askubuntu.com/" But i need to make it now runnable for normal Users. So i place a desktop ...
2
votes
1answer
38 views

post-receive: No such file or directory

I'm getting an error when trying to push to a remote Amazon EC2 (Ubuntu Linux) instance. I've given all related directories and files full permissions. I'm trying to use a post-receive hook to move ...
1
vote
2answers
55 views

Unable to delete file

I am unable to delete file: sudo rm /usr/local/bin/Katy Perry - Dark Horse (Official) ft. Juicy J-0KSOMA3QBU0.mp4.part It is showing an error: bash: syntax error near unexpected token `(' How to ...
1
vote
2answers
79 views

Only display a range of entries from the bash history

Is it possible to set a fixed number for the "history" command to only show a certain amount of history items like 100, instead of everything from the beginning of time?
1
vote
0answers
46 views

Display running clock in terminal [duplicate]

I want to display running clock inside terminal. I have already gone through this answer but this method only works in zsh terminal. But I want to display in bash. Is there any other way to display ...
5
votes
1answer
800 views

Difference between cd / and cd //? [duplicate]

What is the difference between cd / and cd //? We can see that adding / to the end doesn't do anything. But when I do cd // and pwd, I found: $ cd // $ pwd // What is difference between / and ...
0
votes
0answers
18 views

Run script in another opened terminal

Is it possible to run a script in another opened terminal? In that case I would need to know all opened ttys. Another case would be, if I'm using SSH to login into a remote host. I would like to run ...
0
votes
4answers
38 views

Explain exec in simple terms?

I don't understand the bash command exec. I have seen it used inside scripts to redirect all output to a file (see ...
3
votes
1answer
65 views

How to quickly check the value of bash variables, aliases and history commands from terminal?

How do you expand in place: bash aliases environment variables history commands to edit them and check they are correct? For example, I have some aliases I use for flashing different devices and ...
7
votes
2answers
178 views

Creating a new subdirectory in multiple existing directories

I am trying to figure out an elegant way to create a new subdirectory in a series of existing directories. I have 15 already created directories called Week1 through Week15. Within those ...
2
votes
2answers
68 views

Pass variable value to script from terminal

I like the shred command so instead of using the 'rm' command I prefer shred. I would like to create a bash script in /usr/bin, say we will call it "shredder" so that if I want to shred a file (i.e. ...
1
vote
0answers
36 views

“sudo !!” doesn't give me permissions. What am I missing? [duplicate]

When you forgot to sudo a command you may want to write, sudo !! That would execute the last command applying the sudo command to it. However sometimes seems I can't do that, for example inside ...
11
votes
5answers
1k views

How can I run original command that aliased with same name?

An alias for ls command in ~/.bashrc file aliased with this one: alias ls='ls --color=auto' then, when I run ls command in terminal aliased ls(ls --color=auto) runs. but my question is how can I ...
1
vote
1answer
72 views

Crontab not executing jobs Ubuntu 14.04

I am trying to run bash script as a cron job every 15 minutes. The bash script simple calls a Java program. I made an entry in crontab to run the file every 15 minutes and saved it but it would not ...
1
vote
2answers
73 views

Hide stdout of a process only when it is running in background

How could I hide the standard output of a process only when it is running in background? For example, test.sh #!/bin/bash for i in $(seq 200); do echo $i done Now, I run the script. I stop ...
0
votes
1answer
27 views

CPU performance on sleep command

This is rather a beginner question. I wonder what happens when sleep command is triggered from a bash script, for example. That job would still running, with less priority?