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

learn more… | top users | synonyms (1)

0
votes
0answers
17 views

Create a clickable install script for software

I want to create a simple script that a user can download, click on, and it will: request their root password through some sort of pop-up interface then sudo apt-get install a package to their ...
0
votes
1answer
41 views

Permanent PATH variable

How will I make this /media/De Soft/mongodb/bin PATH variable permanent? Everyone is saying export PATH=$PATH:media/De\ Soft/mongodb/bin to your ~/.profile, or .bashrc, or .zshenv depending on your ...
0
votes
1answer
33 views

Cron job not running - postfix/sendmail error

Here is my content of sudo crontab -e @hourly /home/userName/ntpdate.sh The content of my script (ntpdate.sh) //.25 is my ntp server echo "Current time is $(date), " >> ...
0
votes
0answers
21 views

Disable 'ESC' and 'Shift + Tab' history shortcuts in terminal

When in a bash terminal, if I hit ESC or Shift + Tab the command line goes to the history where I can move around to previous bash commands with vi-like bindings. I get messed up when in this mode ...
0
votes
0answers
28 views

How much Memory/RAM is really being used by this Ubuntu 14.04 system

How much RAM/memory is really being used by the Ubuntu 14.04 x64 system? From htop, the amount of memory used is 3 GB and swap usage (on SSD) is 5.7 GB. However it appears that the most memory hungry ...
2
votes
2answers
55 views

Opening multiple terminal tabs and running command

I need to open multiple terminal tabs, give them titles, go to a directory, and make each tab run a command. I am new to Linux and shell scripting, after searching online and checking some solutions, ...
0
votes
2answers
25 views

Running a .sh from a .desktop [Making an icon for Minecraft.]

Rather recently, I've decided to add minecraft to my dock. I play it enough to want it on my dock. I created a .desktop file, and I gave it an icon, name, and such. I figured that point the exec at ...
0
votes
2answers
37 views

Running a .sh to execute multiple commands

I was curious how I would go about running multiple commands via shell script. For example, just to try it out, I'd like to be able to connect a .desktop to a .sh that will run all the update codes ...
2
votes
3answers
234 views

Setting a randomly generated password to a variable?

I'm using the following line to create a randomly generated password in a bash script, but it doesn't look like the string is actually being set to the variable. #Generate random password ...
0
votes
0answers
23 views

access to all of the written on the terminal [duplicate]

I know there is .bash_history file on the home directory that stores all of the commands whom user has interred them. But I am looking for all thing which we see on the terminal. .bash_history file ...
0
votes
1answer
31 views

Bash history not saved after closing terminal

I recently replaced my Ubuntu 14.04 installation with Ubuntu Gnome (which comes with Gnome DE). But I noticed that bash history is not saved once the terminal session is closed. Once I close a ...
0
votes
2answers
29 views

Bash script to enable / disable SSH

Im running ubuntu 14.04 LTS (no GUI) and im looking to write a bash script that does the following: Check to see if the ssh service is enabled or disabled If enabled, then disable, if ...
2
votes
1answer
48 views

Is there any reason to use 'kill' instead of 'killall'/'pkill'?

Starting my adventure with Linux a couple of years back, most tutorials and older, more experienced colleagues suggested using the command 'kill', sort of like a replacement for the Process Manager ...
2
votes
2answers
24 views

Background Job (launched with '&') Stops On Logout

I am using AWS to setup a Node.JS server. I launch node in the background by the following command: node server.js & However, when I log out, the process ends. From my previous 'nix ...
0
votes
4answers
30 views

SSH remote command execute stays without disconnect when finished execute?

I am trying to build a script/command that will restart our Asterisk/Elastix service on our PBX. The script is basically using simple command with auto log-in public key that run from Ubuntu ...
0
votes
1answer
30 views

Unigine Heaven run directly from terminal?

I think a lot of you would have benchmarked your Linux system using Unigine Heaven Benchmark 4.0. I know to run the it you can simply go to the Unigine Heaven folder and run the shell script file ...
0
votes
2answers
52 views

How to learn shell programming in linux ? [duplicate]

I use ubuntu and have no idea about dos/powershell programming and I know only c language. please suggest a good book on shell programming , and also any advice regarding prerequisites for shell ...
1
vote
2answers
90 views

How can I extract specific string in Linux? [closed]

I'm a newbie in Bash and I had a difficulty on how I will get the specific string in my file below: DS*SC*S45WG*X56558*2 NE*823*2*SC*q345w45*DT*RTD*7530SRT RJTROIT**20140617 SNA**TP*55 ...
0
votes
1answer
24 views

How to make those values I get from my Linux script to become the values in my XML file [closed]

I have a problem on how can I make the values I get from my bash script to become the value to my XML file. Below is my XML file: <?xml version="1.0"?> <List> <Info> ...
0
votes
1answer
17 views

How To write to Sub-D I/O using bash

I want to control(write and read) the sub-d parallel Pins (usually used for interfacing a printer) using bash-scripts. I know, that I could use pySerial or c, but I don't like them;). I want to use ...
2
votes
1answer
37 views

Is it possible to diy a command under Ubuntu? [duplicate]

For example, can I set? gb = cd /media/Dan/evolution so that everytime I execute gb in bash , I can cd to that particular directory? I find something online, 'alias' command. But It seems can't do ...
7
votes
3answers
99 views

List files appended with an order number

Is there a quick way to list all the files from a location having an appended order number? something like: ls -a generates the result: 1 file a 2 file b ... 100 file whatever Thanks. P.S. ...
1
vote
2answers
140 views

How do I batch copy files sequentially from one folder to another?

I have a music player that ridiculously enough, refuses to play files according to the alphabetical and numerical order, but based upon the order in which they are copied to the audio player. As ...
-1
votes
0answers
33 views

java install shell script

Hi i need to write shell script which first check java is installed if not download and install.This is my script.But my machine already installed java.Then it is downloading(apt-get install).So can ...
1
vote
2answers
43 views

difference between executable and ./executable

In some cases, i need to use ./executable instead of simply executable when running a file in bash. What exactly is the difference and how do i know which one i should be using? For example, i have ...
0
votes
1answer
24 views

how to direct php version to php in LAMPP to set default?

i'm just newbie in ubuntu i have install php before install lamp, when i type "which php" ==> /usr/bin/php not to direct in directory php in LAMP because php in LAMPP have enable mcrypt...but php in ...
-1
votes
0answers
13 views

samtools merge bam file help

I am trying to figure out a full correct script to merge sorted bam files in one big bam file. I know it begins with samtools merge, but i don't know where to go from there. I know it has to do ...
1
vote
0answers
38 views

Why can't I redirect grep output to file?

I am running command like this. # ( ( partclone.restore -X -s some.img -o /dev/sda3 2>&3 ) 3>&1 ) | grep Completed Completed: 0.40% Completed: 1.23% Completed: 2.07% ... ...
1
vote
1answer
60 views

sed “Permission denied” and “No such file or directory” errors while building Clockwordmod

Whenever I execute the command build/tools/device/mkvendor.sh samsung_aegis2vzw /your/path/to/the/boot.img I get this as the output build/tools/device/mkvendor.sh: line 83: /sedcommand: ...
1
vote
1answer
38 views

Execute a statement /bin/bash seems not to work in Virtualbox client

I do not know if AskUbuntu is the correct place to ask or Stack Overflow. To execute a statement in Windows use : C:\\Windows\\System32\\cmd.exe What is the equivalent in Ubuntu? I thought it was : ...
2
votes
1answer
55 views

Permission denied error after SSH login

I am having Permission denied errors after logging with non root user (which has permissions to do "sudo -i" command). I get these errors: -bash: /bin/uname: Permission denied -bash: [: =: unary ...
13
votes
2answers
2k views

Installing breach browser

EDIT: Just look at the accepted answer. I wasn't how it worked at the time of writing so I just guessed below. I am new to Linux so this might be a noob question. I am trying to install a new web ...
1
vote
2answers
53 views

Specify password for sudo in script

I am making a script that will update my system (and do some other things, but that doesn't matter). I want the script to run sudo apt-get update and sudo apt-get dist-upgrade --yes automatically. I ...
-1
votes
1answer
53 views

How to change the terminal title in Ubuntu 14.04? [duplicate]

I have a function that changes the title of the terminal, like following: title() { echo -en "\033]2;$1\007" } This does not work any more in Ubuntu 14.04. From what i have investigated so ...
4
votes
2answers
442 views

What does !$ means in Bash scripting?

When reading the content of a script, I found something like: echo "An Example" > !$ So I wonder what does !$ mean in bash .
0
votes
3answers
35 views

Uninstall a package that I have installed using a .sh script [duplicate]

I have more older versions of NetBeans installed on my system and I would like to uninstall them. The problem is that I have installed them all from a .sh shell installer script simply running from ...
1
vote
3answers
128 views

How can we remove text from start to some particular selected word using sed command in linux

I have a simple query related to selection and replacing text in linux. For explaning question I am using sed command. I have following text. hello world, I am just simple text for display. Now ...
0
votes
2answers
17 views

Read/If command help

I'm trying to run this- #!/bin/bash echo "Who are you?" read NAMES { if [ "$NAMES" == "Mallory" ] ; echo "Hello, me!" else [ "$NAMES" == "Palmer" ] ; echo "Hey, baby! I love you!" else ...
0
votes
2answers
22 views

Prevent parameter expansion in shell script

Folks, I often have to do a recursive search in files. Tired of typing the whole "find/grep" combination all the time, I just created a script with the following line: find . -name $1 -exec grep $2 ...
1
vote
1answer
24 views

Pass variables to script which called script

I have a bash script which must call another bash script which varies per-user in order to get some configuration information, like so: somescript: #!/bin/bash ${HOME}/.ssconfig echo "Hello, ...
1
vote
1answer
17 views

Raise all windows with a specific title

I'm trying to find a way to raise all the windows that have one, specific title. For example, I have two windows named superconky (yes, you guessed it, I'm trying to get conky running in lubuntu). I ...
0
votes
0answers
25 views

Why I obtain this compile error when I try to install a software?

I am not yet a Linux guy and I am going crazy trying to install a software compiling it on Ubuntu 14.04. This are the only provided instruction to install it: Debian First, make sure that ...
0
votes
1answer
33 views

In this script, ~ is /root/. How to be in /home/name-of-the-user/?

#!/bin/bash #become root UID=$(id -u) if [ x$UID != x0 ] then printf -v cmd_str '%q ' "$0" "$@" exec sudo su -c "$cmd_str" fi mkdir ~/.D3GO/; cp -a `pwd`/viewright_backup/. ~/.D3GO/; ...
4
votes
2answers
50 views

Change current working directory only by typing the name of the new one

Something similar to this Q&A, I know that cd will change current working directory in terminal to a new directory like this: cd /path/to/new_directory But I wonder how can I change current ...
0
votes
2answers
22 views

How to make a script that will make another script in the same folder executable?

How to make a script that will make another script in the same folder executable? I don't want to worry about path since it will be in the same directory. So it should be something like(i'm trying to ...
1
vote
1answer
26 views

Launch app with absolute path does not woks

I'm quite new in Linux environments, but for this one, I need help on bash. I'm on Kubuntu 14.04 x64 I have an embedded JRE for my business application , placed like this: app_root/run.sh (my ...
2
votes
2answers
56 views

Bash Function Oblivion [duplicate]

I'm fairly new to Linux, as many of you may have noticed. What I speak particularly is adding personal, user-generated functions and alias in my .bashrc file. I'm not exactly sure how bash works but ...
1
vote
0answers
16 views

Git prompt won't colorize

I want my git prompt in bash to colorize (green for clean repos, red for dirty repos). Right now, it shows plain white text no matter the git state of my cwd/repo. ...
0
votes
3answers
61 views

Create a random decimal number in bash

I am programming in bash. I return a function f, lets say f=logn. I now want to add an error up to 5 percent to that function. Therefore now I use : my_log=$(echo "l($i)" | bc -l) echo $my_log |bc ...
3
votes
1answer
105 views

Why some user functions don't get recognised by bash with sudo?

Initial conditions : I have defined a function and export it: myfunction () { echo OK ; } export -f myfunction I have a simple bash file : test.sh #!/bin/bash myfunction Test OK with the current ...