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

learn more… | top users | synonyms (1)

0
votes
3answers
41 views

What's the easiest way to list files of a given extension, save that list to a text file, but omitting the actual extensions when in the text file?

This is for a counterstrike server, where mapcycle.txt contains all the maps found in the maps/ folder, but the list of maps must not contain the .bsp extension. Example of maps/ folder: map1.bsp ...
1
vote
0answers
116 views

Unable to reproduce the ShellShock bug locally

I have been trying to reproduce the Shellshock bug on my local 14.04 Ubuntu VM without any luck. I know my local bash version is still vulnerable because the following command prints out the commented ...
16
votes
1answer
1k views

What does su > echo “<username>” mean?

When I was entering the command su > echo "sachin" it was asking for a password. When I gave my password, some strange things happened as you can see: One more thing: there is another user, ...
0
votes
1answer
65 views

Ubuntu 14.04 Add a notification icon

everyone. I have a wonderful application that I made called Btools. I want to know how to add an icon to the notification tray. Please know that this was written in bash. Thanks for the help.
0
votes
1answer
106 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 ...
2
votes
1answer
42 views

Terminal errors on terminal startup

Whenever I start the Terminal, I get two errors at the top that say -bash: export:, then a path string, and then : not a valid identifier. I know that these errors are being thrown because of an ...
2
votes
1answer
5k views

Shellshock: How can I update only Bash without restarting?

I want to fix the Shellshock issue, and the usual solution is to update Ubuntu. How can I update only Bash and without having to reboot?
2
votes
1answer
354 views

How to set environment without sourcing .bash_profile myself every time? [duplicate]

When I restart Ubuntu 14.04, environment variables are set back to default and I have to run source .bash_profile every time which is very annoying. I generally keep my environment vars in ...
0
votes
0answers
24 views

How can I give an option (-o vi) to login shell

I want my login shell to be started with option -o vi so that instead of /bin/bash my login shell would be /bin/bash -o vi I tried changing /etc/passwd but that result in invalid shell, as it ...
1
vote
1answer
51 views

How to remove “dpkg -l” line with “in” for unwanted i386 package on amd64 system?

I will really appreciate your help with this. When I run dpkg -l bash, I get this: Desired=Unknown/Install/Remove/Purge/Hold | ...
1
vote
2answers
813 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
votes
1answer
78 views

why can the terminal not find my executable

Hey all i have been experimenting with make and Ubuntu 14.04 in order to automate the build i have created 2 simple programs test2.exe test2.c #include <stdio.h> int main() { ...
2
votes
2answers
90 views

Problem in creating alias, get strange messages

[Reviewers: note that the question was completely rewritten after the close votes.] I recently found how I can define aliases for bash in the ~/.bashrc. But since I tried that, I see the followig ...
0
votes
2answers
46 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 ...
1
vote
0answers
129 views

Synaptic Package Manager -E-“cache open”, E - Default-Release not available

In an attempt to re-install Bash I tried to open Synaptic Package Manager but got this message E: The value 'precise-updates' is invalid for APT::Default-Release as such a release is not available in ...
3
votes
1answer
119 views

How can I start a shutdown with cron,only if no download is in progress?

I would like to shutdown my computer half-past twelve every day and can do that with "echo "30 0 * * * /sbin/shutdown -h now" > myrootcron.sh",but what if I want to cancel that shutdown or leave it ...
1
vote
4answers
3k views

How to write the path of a folder with space in it's name? [duplicate]

I can't figure out how to write the path of a folder that includes spaces in its name (in Terminal). I tried: cd /path/path/path/"A Folder"/file cd /path/path/path/'A Folder/file cd ...
0
votes
0answers
99 views

Unable to upgrade bash [duplicate]

everyone knows about bash vulnerability "CVE-2014-6271", I'm trying to update bash using below command. apt-get update && apt-get install --only-upgrade bash but i'm getting bash is already ...
1
vote
2answers
456 views

Shell script running but not opening terminal [duplicate]

I'm having a problem executing a shell script in ubuntu, the script is set as executable and I enabled the execute instead of view option in Nautilus and the script does what it's meant to do which is ...
0
votes
4answers
1k 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
0answers
77 views

How to fix RAID1 array by mdadm with script?

In system works two RAID1-arrays madadm. There is one reserve disk to change faulty disk. I need to write a script which will be monitoring disks and automatically fix degraded array. How do you ...
0
votes
0answers
64 views

bash autocomplete behaving strangely after update

Since bash was updated very recently, when I try to autocomplete by tabbing during a cd I get the following... tony@tony-HP:~$ cd Mucword=1 words[0]=${!ref}${COMP_WORDS[i]} ...
0
votes
2answers
136 views

Install only bash from trusty on old distributions (to be save from Shellshock vulnerability)

Is there a way to just install only bash from the latest distribution on an old mashine? I once did pinning to a certain version of a package, but that was bevcause I didn't want to update that ...
0
votes
1answer
484 views

How to fix invalid identifier error after setting environment variables?

I'm trying to setup cocos2dx in Ubuntu 14.04 LTS but after setting the environmental variables (in .bashrc) I start getting this error: bash: export: dev/cocos2d-x-3.2/tools/cocos2d-console/bin': not ...
1
vote
2answers
88 views

How do you clear, delete, or hide a portion of your history in the Terminal?

clear will not work, because that clears your screen. What I am looking to do is just hide, delete, or obfuscate a portion of history on my display in my session, namely a command that I inputted that ...
2
votes
3answers
107 views

Search for a files that matches another file name in another folder

I have some files in a folder, which are named ***_code_c**** (where * represents any letter or number). I have another folder that have many files, folders and subfolders inside it. What I want to do ...
0
votes
2answers
297 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.... ...
29
votes
2answers
15k views

Explanation of the command to check shellshock

Here is the command I have used to check my bash shell for the Shellshock bug: env x='() { :;}; echo vulnerable' bash -c "echo this is a test" Can anyone please explain the command in details?
8
votes
4answers
643 views

Can I use cd../.. as an alias name?

I am using Windows and Ubuntu in parallel and do console stuff on both of them. On Windows I can do a C:\Users\Thomas>cd..\.. C:\> However, on Linux this does not work, neither with ...
0
votes
2answers
1k views

Ubuntu Trusty can't update bash

I'm trying to upgrade bash to the latest version to fix the bash vulnerability, but my machine can't seem to find the new package to install. Don't know what I'm doing wrong. user@machine:~$ env ...
5
votes
2answers
226 views

How can I delete numbered files in a given range?

I have folderA that has some files with a number sequence starting with a_000000. What I want to do is to delete files starting from a specific number: let's say a_000750 till the end of files in this ...
1
vote
1answer
778 views

No longer see Bash warning messages for Shellshock after update

I just updated Ubuntu from an Update pop-up. I am aware of Shellshock, so I quickly went ahead with the install. Now, when I try running env x='() { :;}; echo vulnerable' bash -c 'echo hello' I ...
0
votes
1answer
210 views

bash version does not change

bash has been updated at least twice in the last two days, but the output of bash --version did not change. Its first line keeps saying: GNU bash, version 4.3.11(1)-release (x86_64-pc-linux-gnu) ...
0
votes
0answers
30 views

Creating an alias with tab completion

I know how to create a permanent alias, just edit .bashrc . I created alias forsudo apt-get install <appname> . As you may not know the exact name of app or want to check the dependency u can ...
0
votes
1answer
240 views

Bash Shellshock Fix Applied But Seems that Additional Fix is Required

First time using this Ubuntu Forum, Not sure if this is right place to raise this issue. Anyway, I am having a Ubuntu 14-04 VPS running. I have applied: sudo apt-get update && sudo apt-get ...
0
votes
1answer
84 views

save number of lines of a text file in a variable shell file

I'm working on terminal and running a .sh file and I want to count the lines in another file and save it as a variable to be used in this .sh file. I'm using this command sed -n '$=' /lines.txt when I ...
7
votes
2answers
544 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
66 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
93 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 ...
1
vote
3answers
175 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
374 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
222 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
267 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
86 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
266 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
353 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 ...
127
votes
5answers
92k 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 && ...