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

learn more… | top users | synonyms (1)

0
votes
1answer
5 views

Abaqus Installation

I am new to Ubuntu. I am trying to install Abaqus 6.12 on Ubuntu 12.04. I could mount the.iso file on a virtual drive. When I try to run the setup file, I am getting this error. ***ERROR. The ...
0
votes
1answer
20 views

What does bash do with line 11 here?

The nature of the question here is broad enough truly to include Ubuntu. I was just picking around forums analyzing this and that and line 11 puzzled me. What I would like to know is, what exactly is ...
0
votes
2answers
14 views

Why is /bin/true such a large file? How would I find the source code?

I just found out about /bin/true yesterday. I'm not a bash power user by any means, but I decided to check it out. I was surprised to find that it is a 22K file (Ubuntu 12.04), and not one of the ...
1
vote
1answer
14 views

Why cant I install NLTK?

I am trying to install Natural Language Tool Kit for Python on my Unix machine as per the below: http://www.nltk.org/install.html however when I get to .." sudo pip install -U numpy" I get the ...
0
votes
0answers
9 views

VIM stopped accepting a keyboard command

For some reason as of 3 days ago my VIM stopped accepting Ctrl-x from me. I have this combo mapped to Copy to X clipboard. It worked perfectly before 3 days ago. I have not changed my .vimrc file at ...
1
vote
2answers
19 views

Startup script Problem

I am new to Ubuntu.I want to run this script every time my system reboots.Is there a way to do that?Thanks in advance for help. # !/bin/bash #fix resolution problem xrandr --newmode "1440x900_60.00" ...
12
votes
5answers
335 views

Using cd command to navigate directories in Ubuntu which have special characters

When I want to navigate into directories having special characters in their names I get an error message. For example: aman@desktop:~/Aman$ cd !)e$!gn&(reate bash: !: event not found ...
1
vote
2answers
31 views

Attempting to setup Ubuntu 12.04 SSH Server: -bash: /etc/hostname: Permission denied

Attempting to setup an SSH-server running Ubuntu 12.04. Went to "HowToForge" to scout for potentially advanced or knowledgeable advice upon how to accomplish this, then I ended up running into a ...
3
votes
1answer
39 views

Remove lines of code from multiple files

I'm running a Web Server in a Virtual Box for testing some projects. And I noticed that some of the html files have this unwanted lines. I want these lines of code from multiple html/htm files ...
0
votes
0answers
20 views

Tutorial: How to run a script as root when user logs in [on hold]

I needed to run a script as root when I logged in. I figured out how to do this. In terminal, become root (sudo su). Copy your script to /usr/bin: cp script.sh /usr/bin Make the script executable: ...
2
votes
1answer
24 views

Ctrl+a doesn't return all the way back in terminal

I recently updated my prompt to look something like [user@User] ~/wroking/directory (git-branch) ↳ using the following code in my .bashrc source ~/.local/bin/git-prompt.sh ...
0
votes
1answer
31 views

shell script to function on subfolders

I want to write a simple shell script that will go into all the sub-folders in a directory, and organise the files in the sub-folders into new directories. Basically in terminal it would look like: ...
2
votes
1answer
38 views

Bash script callable from home but not scripts directory

I'm having a very weird error when trying to make a script callable. I have a scripts directory in /srv/projectname/scripts where I store you know scripts to be called as cron jobs for different ...
4
votes
3answers
70 views

How to check the number of fields given to the `read` command?

I have a quick question relating to $# in the shell scripts. So, I can use $# at the command line to check the number of a shell script arguments given by the user. Example: # ./shellScript varONE ...
3
votes
4answers
152 views

Add to path only sh file not a dir

I have a bin folder with a bunch of sh files. For example "server-run.sh", "server-stop.sh", "server-do-something.sh". And I want to run file "server-stop.sh" from anywhere. I could add this bin ...
0
votes
2answers
15 views

What's the main difference between bash and zsh? [on hold]

Someone told me that some commands in zsh shell may differ from the bash shell commands. So what's the main difference between zsh and bash shells?
0
votes
1answer
52 views

Shell script issue: cron job script to Restart MySQL server when it stops accidentally

I have this script, I am using it to setup CRON job to execute this script, so it can check if MySQL service is running; if not then it restart the MySQL service: #!/bin/bash service mysql status| ...
4
votes
2answers
144 views

How to get the current upload and download speeds in terminal?

I want the terminal to output the current upload and download speeds of my network connection. I do not want to monitor the speeds in real time. I just want a "static" value to be able to write it in ...
-1
votes
1answer
26 views

Bad substitution error in appending a variable to a filename (renaming file)

I tried to append a variable value to a filename and get the file name as: Page_variablevalue It gives bad substitution error when at line: mv "$page.txt" "page_${variablevalue}.txt" Please ...
1
vote
1answer
36 views

Change the user in bin/bash

I want a script X.sh to switch users and perform an action, but so far I have this: #!/bin/sh sudo su partner -s /bin/bash supervisord -c ~/supervisord.conf exit I want that the user partner ...
0
votes
1answer
33 views

Array Splitting in bash [closed]

This following piece of code for constructing a sub array gives the output - sdf,sdf,sdf,sdf sdf,sdf,sdf,sdf But the expected output should be sdf,sdf,sdf,sdf sdf,sdf What is wrong with the ...
1
vote
1answer
41 views

How to edit /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts and similar files and why they can (not) be edited

I a trying to edit the following file (ls -alstr output): 0 -rw-r--r-- 1 root root 0 Apr 15 17:07 /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts Unfortunately, if I try to edit it with vim or simply ...
0
votes
2answers
36 views

Automating apt-get install with --assume-yes

I am trying to write a bash script to install a list of software. I am using --assume-yes to get pass the prompts This following line somehow doesn't work sudo apt-get install ...
-2
votes
1answer
30 views

what is wrong with this piece of code? [closed]

The following piece of code where I want to check if an array is empty gives the error - re.sh: line 3: [0: command not found. The error is at the if statement. What is wrong with it? #!/bin/bash ...
0
votes
0answers
5 views

Startup script xrandr missing LSB tags and overrides please help

hello i have a simple script that looks like this xrandr -s 1680x1050 When i run it standalone it works! when i put the script into /etc/init.d/xrandr.sh I get the error "missing LSB tags and ...
1
vote
1answer
43 views

Bash script for execute one command for many files

I just tried to clear my holiday video stuff and found program for stibilizng vision. There are a lot of files so I made script to stabilize all. Firstly I need to run command: transcode -J ...
2
votes
1answer
41 views

Can't find binary file in path

folks. I've extracted a tar file with a few binaries into /usr/local/arm/bin and setup my path to include this folder. When I try to run which: $ which arm-elf-gcc /usr/local/arm/bin/arm-elf-gcc ...
6
votes
2answers
270 views

How to tell which parameter is being supplied to a command with a redirectioin operator?

This works: $ echo "notify-send HELLO" | at now This doesn't: $ at now < echo "notify-send HELLO" It says 'file or directory not found". I understand there's a -f option to this ...
4
votes
2answers
351 views

How to automatically launch bash shell when opening terminal or in console mode?

I create a normal user account in ubuntu using "useradd" command, but the problem is that I have to type "bash" to launch the bash shell for this user account in both the console mode (in a tty, ...
6
votes
2answers
219 views

Where is the bash history for the root user saved?

I'm not talking about .bash_history from my home directory. I usually prefer to use sudo -i or sudo su and then run commands as root user. Since, after these commands the history is not saved in the ...
0
votes
2answers
38 views

Why is this command starting endless terminals and how to make it work?

#!/bin/bash gnome-terminal --command='/home/user23/bin/n-youtube-dl "$1"' I want to pass the argument passed to this script to the other script started in the terminal. But this starts endless gnome ...
0
votes
0answers
43 views

How to enable lock screen button in Unity after installing xscreensaver?

I need this because I replaced gnome-screensaver with xscreensaver, so the lock screen button does not work. The alias path - may be the XY problem AFAIK alias is usually used to make 'shortcut' for ...
1
vote
1answer
51 views

Pause execution and wait for user input

I have a script that I am making and I have an issue with it: I would like to pause execution and wait for user input. I thought that I had it with the read -p -n 1 $foo command but the system is ...
3
votes
3answers
190 views

Explain this shell redirection: uuencode host-file < host-file >encodedfile

How the below shell redirection works ? Appears to be complicated to understand the order of execution. Any easy explanation ? uuencode host-file < host-file >encodedfile
0
votes
0answers
25 views

Absolute basic MQ wanted - command line driven

I am looking to install a very basic command line accessible MQ product. It will be run on Ubuntu 12.04 lts, and should be able to support multiple readers. Any products I should be looking at?
-3
votes
1answer
39 views

Scripting downloaded programs

I downloaded a game for fun and I would like to add it as part of my code for my butler program. Say I have the game moon-buggy and I would have this code run it. if [ $word = "buggy" ] then ...
2
votes
1answer
60 views

How can one run a shell script just before the desktop session begins?

I want my system to run with 1366x768 resolution. Note that this resolution is not detected by the open source driver. So I created a bash script as follows :- xrandr --newmode "1368x768_60.00" ...
2
votes
1answer
125 views

Bash completion for the new apt command

I like the new apt command (which will be included in the upcoming trusty release) so much that I installed it on my precise system by compiling the 14.04 package from source. Unfortunately, bash ...
8
votes
2answers
402 views

Can I enable bash-completion for the new apt command?

The new apt command in 14.04 seems to be a really useful intersection of functionality between apt-get and apt-cache but the current version of bash-completion doesn't know about it... Which makes it ...
9
votes
3answers
713 views

what does -x mean in if conditional statement?

what does -x mean here: if [ -x /etc/rc.local ] then How could I find out this manual page for if?
0
votes
1answer
37 views

su to different user no longer working in 12.04 LTS

I want to log on as tomcat7 user in a different bash command shell. I used to be able to do this by doing the following: sudo su - tomcat7 But when I enter this command now I get returned to the ...
0
votes
1answer
14 views

Changing .bashrc to allow a call to “android” from any directory

I can successfully do the following command in the directory listed kn@MrComp:~/.android_os/adt-bundle-linux/sdk/tools$ android list targets Available Android targets: ---------- id: 1 or ...
1
vote
1answer
47 views

Why is 'sudo bash' a bad idea? [duplicate]

Anyone want to comment on sudo bash in comparison to sudo su and sudo -i? I know sudo -i is the preferred because "environment". I've gotten into the bad habit from years ago when I was a kid in a ...
3
votes
1answer
36 views

Append current timestamp on files name from background running command

Following is command that I have used in bash script and it is run on background: sshpass -p prakash12 ssh -t -p $1 prakash@localhost './test_new_update_script.sh > ...
1
vote
1answer
102 views

Difference between 'grep' in Ubuntu and Kali Linux?

I always used the following command to filter out my contacts email addresses from a directory in Kali Linux: grep -rIhEo "\b[a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\.[a-zA-Z0-9._-]+\b" >> 1A I tried ...
1
vote
2answers
18 views

Bash/zsh: Undo erase backwards (ctrl+w)

In Bash and Zsh ctrl+w erases backwards from where the cursor is. Is it also possible to undo what I had erased? Thanks!
0
votes
2answers
35 views

lscpu output differs when called indirectly?

I use lscpu | grep 'MHz' to get my clock speed. I am getting different results based on the method I am calling this command. Method 1: typing it in the terminal CPU MHz: 1200.000 Method 2: ...
0
votes
1answer
36 views

Why do I need to run “/bin/bash --login”

I have just setup a new Ubuntu 13.10 server with ruby 2.1.1 installed through rvm. The problem is that whenever I switch to the user "rails" (the user I installed ruby and rails with) I have to run ...
8
votes
6answers
469 views

Is there any manual to get the list of bash shortcut keys?

There are many shortcuts that I use while interacting with bash command line to make the work easier and faster. Like: ctrl+L: to clear the screen ctrl+a/ctrl+e: to move start/end of the line ...
1
vote
2answers
176 views

How would I make a program go back to the start.

So I have my program and I cannot figure out how to make the program loop back to the start. I have more of a program however this is the part where I would like the program to restart if I picked yes ...