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

learn more… | top users | synonyms (1)

1
vote
2answers
34 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 ...
-1
votes
1answer
17 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 #include <stdio.h> int main() { printf("%s","Built ...
47
votes
5answers
74k views

How can I decode a base64 string from the command line?

I would like to write a bash script to decode a base64 string. For example I type decode QWxhZGRpbjpvcGVuIHNlc2FtZQ== and it prints Aladdin:open sesame and returns to the prompt. So far I have tried ...
8
votes
4answers
4k views

Generic solution to prevent a long cron job from running in parallel?

I am looking for a simple and generic solution that would allow you to execute any script or application in crontab and prevent it from running twice. The solution should be independent on the ...
0
votes
2answers
25 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 ...
3
votes
2answers
433 views

How to write bash actions to a file?

I know that there is a way to write bash shell outputs to a file. However, I want to know what commands have been executed by an application as some of these executions are not outputted as a shell ...
-1
votes
0answers
39 views

How do i remove bash?

How do I remove bash? Please help. I have heard that bash has a problem(virus), so I want to remove it. Will it cause any problem if I do so?
7
votes
4answers
556 views

Use of default alias “alert”

The default alias Alert is for the command notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e ...
1
vote
1answer
510 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 ...
1
vote
0answers
11 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 ...
18
votes
2answers
4k views

Explanation of the command to check shellshock [duplicate]

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?
3
votes
1answer
93 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 ...
33
votes
3answers
65k views

How do I find the version of bash I am running?

(learning bash) I was trying to check the bash version so I typed /bin/bash -v. That outputted a whole lot of text to the screen (contents of .bashrc, and other files sourced from it). Could I have ...
13
votes
7answers
3k views

Auto complete for often used command line commands?

For some projects I often type in a couple commands, like for example: cd an/extremely/long/path/in/which/I/have/some/kinda/project and ./runmyproject --with some --command line --options set ...
1
vote
4answers
165 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 ...
124
votes
5answers
80k 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 ...
0
votes
0answers
96 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
51 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 ...
-2
votes
0answers
32 views

what is bash and is it safe to keep using Ubuntu [duplicate]

There have been many reports regarding problems in Bash for Linux, where can I get information on this problem, what can I do to keep my computer safe and how can I tell if I have affected by this ...
0
votes
4answers
46 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
19 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 ...
2
votes
3answers
82 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 ...
-1
votes
1answer
85 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
0answers
32 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
0answers
19 views

invalid identifier error

hi i'm trying to setup cocos2dx in ubuntu 14.04 LTS but after setting the environmental variables I start getting this error bash: export: dev/cocos2d-x-3.2/tools/cocos2d-console/bin': not a valid ...
-1
votes
0answers
315 views

Error In Phonegap and android while creating project [on hold]

error in creating phonegap project Creating android project... /home/akarshnagariya/.cordova/lib/npm_cache/cordova-android/3.6.3/package/bin/node_modules/q/q.js:126 throw e; ...
1
vote
2answers
49 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 ...
0
votes
2answers
43 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.... ...
7
votes
4answers
436 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 ...
1
vote
1answer
260 views

Startup script can be run multiple times despite pid file

The reason I'm doing this script is because I want to daemonize supervisord: right now I'm in a cloud host in which I don't have access to the /etc or the sudo command; this script is my best attempt ...
-1
votes
0answers
22 views

Bash show-and-tell script with spacebar or enter as stepper [on hold]

I am trying to modify my slide-show bash script so that the last image will remain on the screen until I click the spacebar or enter key to tell the script to step to the next command line. ...
5
votes
2answers
147 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 ...
0
votes
1answer
140 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
2answers
193 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 ...
6
votes
1answer
249 views

Sequence of scripts sourced upon login

I would like to concentrate all my login config in my ~/.bash_profile. There was a ~/.bashrc there by default but I replaced it with a ~/.bash_profile. However, when I log in, something before my ...
-1
votes
0answers
14 views

After security upgrade on 12.04 I lost several setup.sh files in root directory

Toady, after applying an ubuntu upgrade and restarting my computer, when i first open the terminal, bash began to tell me that a setup.sh did not exist. I thought this to be strange. When I went to ...
0
votes
1answer
110 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
20 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
18 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 ...
-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, ...
0
votes
1answer
189 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 ...
0
votes
0answers
55 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 ...
5
votes
2answers
200 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 ...
-1
votes
0answers
21 views

what does the return “Cc:” mean after exectuting a bash script?

I have written a bash pipeline for NGS analysis which worked well. I then tried to make it work for multiple input filenames with the following at the beginning of the script: for i in filename1 ...
0
votes
0answers
18 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 ...
-4
votes
0answers
21 views

different results - but because of what? [closed]

At moment there are rumours at http://golem.de about a long not-detected "bug" in bash - already for over 20 years ... ?! - but it is not this ... - or am I wrong with this here ?! because only of the ...
1
vote
3answers
30 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 ...
-2
votes
0answers
39 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 ...
5
votes
4answers
232 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 ...
8
votes
3answers
8k views

How to delete selected results from bash history?

history command shows all the results but we can filter to get particular command using history | grep searchingCommand. It is really helpful. But the problem is it shows those commands also which ...