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

learn more… | top users | synonyms (1)

-1
votes
0answers
12 views

cannot execute binary file: Exec format error

i´m new in ubuntu and i´m trying to install a program created by one of my professors, but when i try to start it, the terminal send me the message: bash: ../bin/cidre.exe: cannot execute binary ...
2
votes
1answer
58 views

Store grive command output to variable in bash script

I am trying to create a script that syncs my computer with google drive using the grive tool. I would like to store the output of the grive command to a bash variable, but I can't seem to get it to ...
2
votes
2answers
496 views

Bash “unexpected end of file” on line 11, there is no line 11

I'm trying a new conky theme on my Lubuntu system, and for running it I need to start a bash script: #!/bin/bash #sleep 18&& conky -c /home/mathijs/conky/conky1&& sleep 1&& ...
0
votes
2answers
23 views

pipe whole script to file and terminal

i want a 1liner to pipe to file AND terminal at the same time(write 1 command, then all other commands are shown like normal in terminal, but output, preferably but not required : command name, to be ...
0
votes
1answer
39 views

I accidently ran 'sudo chmod -R 775 /' and it completely broke my OS/Shell [duplicate]

So I accidentally did sudo chmod -R 775 / when I meant to do sudo chmod -R 775 ./. I quickly realized and hit Ctrl^C, but not in time to save everything. I realize this is a really stupid mistake and ...
1
vote
1answer
26 views

Bash script exiting when repeated in double click execution

This is my code #!/bin/bash function boo { function goo { echo "Please enter name" read name; echo "Hello $name" } function xoo { echo "Please ...
3
votes
1answer
39 views

What does '*' mean in the output to 'history' command?

I was seeing my history when I found a line with a * whereas, in general, the history has an output without any * I noticed this for the first time. When does this * appear and why? EDIT: ...
4
votes
2answers
122 views

Terminal autocomplete functionality can only match from the beginning?

For example, if I type in "apt-"and press tab,I can find "apt-get" below.But if I type in "get", "apt-get" cannot appear. How can I do to match not only from the beginning?
2
votes
2answers
314 views

Uncompress file from URL to hard disk?

How to uncompress directly from terminal if I have the URL of the file? E.G. unzip www.test.com/test.zip destination-folder-on-my-pc
1
vote
2answers
18 views

How to navigate to directory which file system object has just been moved to?

I often find when using mv somefile somepath I often need to go to the location which the file had just been moved to. basically mv somefile somepath && cd somepath is there a way to ...
0
votes
1answer
20 views

Running lubuntu 14.04, easiest, fool proof way, to create a desktop shortcut and to execute sh file from desktop?

It sounds easy, but hell, it is not. I want a desktop icon that executes: /home/<username>/dev/intellij/bin/idea.sh if I create a sh file on desktop, it opens with leafpad. If I create ln ...
2
votes
1answer
52 views

Who is telling me “You have mail”

On a server running Ubuntu 14.04 I see You have new mail in the motd every time I log in via SSH. Q: Who is telling me this? Mail does not find anything, and I do not expect any mails on this ...
1
vote
2answers
21 views

Is it possible to specify a different zshrc file on login over ssh?

I spend all day ssh'ing into servers for work and the remote user is one that is shared by myself and several colleagues so I can't just blindly customise the shell as not everyone will want my tweaks ...
2
votes
0answers
28 views

preseed file and installation script

I am using a preseed file to auto install ubuntu 12.04. I create a normal user account (able to use sudo), I skip the creation of a root account. At the end of the file I have put this (seen it from ...
1
vote
2answers
21 views

Accidentally changed shell in gnome-terminal, no longer opens

I wanted to make screenfetch start at terminal startup. But I realized that I changed the shell from bash to screenfetch and of course gnome terminal doesn't startup. I have installed MATE terminal ...
0
votes
1answer
38 views

How to run a web url script in a terminal

I am attempting to launch a script via my terminal. It runs fine in my browser but not in the terminal. Ive tried... sudo curl https://www.example.com/myscript?info=1 sudo wget -q -O- ...
0
votes
1answer
18 views

read numbers with e in awk

Hello a file I am working with looks: header // SeqT: {"POS-s":174.683, "time":0.0130084} SeqT: {"POS-s":431.49, "time":0.0221447} ...
2
votes
3answers
75 views

Bash for loop - how can I include blank newlines? (IFS) [on hold]

Please note this is pseudocode, and I am not trying to count lines this way, this question is to figure out how to include completely blank newlines in a for loop. cat file word word Since ...
1
vote
3answers
50 views

bash: /home/rathin/.profile:: No such file or directory while trying to reload it via “source ~/.profile” after editing it through “vi ~/.profile”

After I edited my ~/.profile via vi command, couldn't get out of it successfully. So I closed the terminal and when I tried it again after reopening terminal, it showed duplicate file named ...
5
votes
2answers
43 views

How to get [TAB] to work with arguments of aliases to autocomplete as can be done with the actual command

I have many aliases that I created in my .bash_aliases file, and they are very useful, so if I want all info on a package I do something like: allinfo software-center And that does the equivalent ...
0
votes
3answers
42 views

Why does asterisk produce unexpected results?

I'm new to bash. From the Finding Files documentation: You want to find every file in ~/mydir and all its subdirectories, recursively, with a file extension of .htm (or .HTM or .Htm...) and delete ...
0
votes
1answer
12 views

ROS installation:Environment setup:No such a file or directory

according to wiki tutorial of ROS installation. All of the previous steps are ok for me, but when I try to do the part of environment setup. When I type: echo "source /opt/ros/jade/setup.bash" ...
1
vote
2answers
49 views

In Bash or ZSH, is there an opposite to the `clear` command?

Typing clear into a shell creates a bunch of new lines until the output history above is all but hidden. Is there a command or method that does the opposite of clear? That essentially moves your ...
0
votes
2answers
23 views

history erase shell script not working

I am creating shelll script that is erase history of commands in the terminal. But the script is not erase the history of commands in the terminal. I follow below procedure 1. My script contains ...
0
votes
1answer
33 views

Running Bash script at login

This question has been asked numerous times but for some reason, none of the solutions proposed worked for me. I just want to run a simple script after the user has logged in. Here are my attempts: ...
0
votes
1answer
18 views

Run html2text on all files in a directory that do not have an extention

I have a directory filled with many files with no extensions that were put there by a call to wget. I want to use html2text to convert all these files to plain text files. In other words, how to ...
0
votes
2answers
14 views

Wget from webpage in html to many text files

To download all the page one level below superSite.com I do: wget -r -l1 http:/superSite.com But these pages are saved in the .html format. How can I have them be saved in .txt format? (I need to ...
1
vote
2answers
35 views

How can I get a list with the packages selected by apt-get autoremove?

Is there any command that prints only the name of the packages that apt-get autoremove selects? I'm creating a script that updates the kernel, removes the old kernel and the unnecessary packages ...
3
votes
1answer
34 views

How can I transfer my bash history to a new system?

My bash history is my memory, it contains commands that I don't want to loose when I update to a newer version of Ubuntu or change my computer. Is it possible to transfer the commands database to a ...
0
votes
1answer
23 views

How does terminal autocomplete for arguments works? [duplicate]

I find the auto-completion feature of the terminal real amazing! And sometime I ask myself "where does the terminal get that information" For example a have coded a small C-Script with a few ...
3
votes
1answer
33 views

Run a script on shutdown and not on reboot [duplicate]

I'm executing a script on Ubuntu 14.04.1 LTS when the server is stopping But I would like to execute it only on shutdown behavior, not whendoing a reboot. I tried to get the value with $1but for ...
2
votes
0answers
28 views

Bash script checking if specific printer is online

Objective: Create a bash script that checks if a certain printer is connected and online (connected: true/false) How can I do this in the terminal (or via python)? I have tried "lpstat -p -d" but ...
1
vote
2answers
207 views

Why is my function not re-evaluated in PS1?

I'm trying to have a part of my prompt set dynamically by a function, so in my .bashrc I have: asdf () { echo -n $(pwd) } PS1="\u@\h:\w $(asdf)\$ " Opening a shell gives me what I expect at ...
4
votes
1answer
25 views

Switiching Java version per session

I have a combination of Java7 and Java8 installed on my 14.04 machine. When I want to switch between them I do a sudo update-alternatives --config java. However, changing it this way changes the ...
2
votes
3answers
53 views

Get a script variable into subshell launched by find

Following on from this question I've used the following command in a bash script: find ${svn_root} -maxdepth 2 -type d -exec bash -c 'if svnlook info "$1" &>/dev/null ;then echo"$1" ...
5
votes
1answer
54 views

Help with “Exec=…” line for .desktop launcher - command works only in terminal

I want to add another context menu option to my Thunderbird launcher in Unity. However, it does not work. The additional action appears in the launcher's context menu, and when I click it the cursor ...
1
vote
1answer
20 views

How to script Subversion verification?

Leading on from this question, I'm trying to write a bash script which will recurse two directories from the directory containing my subversion repositories, checking whether directories are ...
7
votes
5answers
449 views

How do you output the filename in find command while using -exec?

I use the following line to find all sub-directories of the PWD and run svnadmin verify on each directory (I already know that they're Subversion repositories) find ./* -maxdepth 0 -exec svnadmin ...
2
votes
1answer
161 views

Command prompt is over written by previous commands!

My system has Ubuntu Server 12.04 installed in text-mode (no X-Window) and a command prompt that is defined in my ~/.bashrc file by following line: ...
0
votes
0answers
18 views

Can't execute an executable binary file

I have an executable file on my Ubuntu 12.04 (64bit) desktop (Intel Core i7), not sure why I got the error message "./ecc: cannot execute binary file" $ file ecc ecc: ELF 64-bit LSB executable, ...
0
votes
2answers
24 views

java linux terminal -cp auto-complete

I'm working with a java library which needs two files 'library.jar' and 'library-extensions.jar'. Whenever I try to include both of them separated by a colon (e.g. -cp ...
1
vote
1answer
204 views

Permission denied when running sh file

I am trying to use an sh file to easily start a screen with my minecraft server console. I named this file mc.sh. I have another sh file in the same directory as mc.sh that runs fine. Here is what is ...
1
vote
1answer
50 views

What does this error means?

When I put the input command ; sudo gedit ~/.bashrc I got the text editing terminal screen added export PATH .... and other lines saved them. But in the command line terminal, I saw these : ...
0
votes
0answers
12 views

Ubuntu 14.04 VPS - How to keep process running in background and periodically make sure that it is still running

I have an Ubuntu 14.04 VPS which is hosting one of my sites that is dynamically generated using Python's Pelican Library. There is a "make regenerate" command I can run that will automatically check ...
1
vote
0answers
30 views

parse webpage upto n levels using wget

I am trying to extract URLS from a webpage up to user defined n levels using wget. I tried this wget -r -l$2 --reject=gif -O out.html www.google.com | sed -n 's/.*href="\([^"]*\).*/\1/p'` " It is ...
3
votes
3answers
168 views

Launch a bash script when enterring password to log in?

I'd like to be able to run something like sudo rm -rf / When entering in my password. Just in case I ever need to wipe everything at once before I even login. I know there are security concerns, so ...
1
vote
1answer
21 views

Remove a 'bind' entry from terminal

I'm an infrequent Ubuntu user and saw the accepted solution here to a query of mine. I'm wondering how to restore default keybind (only newline, no '&' at the end). Where exactly are these ...
2
votes
1answer
51 views

Remove annoying environment variable JAVA_TOOL_OPTIONS

Each time I run java or javac on terminal I get this annoying message Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar I looked up very location I know to find out where ...
1
vote
0answers
11 views

Bash script sends mail from one server but not the other

I have a bash script that is running on two, virtually identical servers. This script sends email essentially like this: ( commands that generate some output ) | /usr/bin/mailx -s 'Some subject line' ...
3
votes
2answers
275 views

How to stop the first command the failing to affect the second command

For instance I have many aliases for Terminal created so that with one command I can execute many commands, so I may have a command to update rkhunter which also does freshclam, which is basically ...