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

learn more… | top users | synonyms (1)

1
vote
2answers
13 views

Error using “cp” to copy files to an external disk

I have a 2TB external HDD formatted with exFat that I use to share very large files (>10GB) among Ubuntu, Windows 7 and MacOS. I am trying to copy the whole content of a directory using sudo cp -r . ...
0
votes
1answer
12 views

Path to shell script in aliases with ./

I'm trying to make an alias for my shell script which is saved in ~/Dokumente/music.sh Therefore, I added following line to ~/.bash_aliases: alias music='.//home/robin/Dokumente/music.sh' After ...
0
votes
0answers
21 views

Install SystemC in Ubuntu 14.04

Q : I want to install SystemC 2.3.1 in my Ubuntu 14.04. During the installation, when I enter make command, the below error occurs. (gcc 4.8 is installed.) What is the problem? /bin/bash: -c: line ...
0
votes
1answer
18 views

curl to tar to zip not working properly

I am wanting to download an tar.gz archive, extract it and compress it into a zip file in one command. Reason for this is to be independent from temporary files. The command I use: curl -L "someURL" ...
1
vote
2answers
38 views

exports in .bashrc not working

I have a program .path.py which prints an export command for PATH. In my .bashrc I have an entry at the top $(python $HOME/.prefix/.path.py) except that when I login over ssh, or even run source ...
1
vote
1answer
32 views

fsl.sh cannot be sourced

I need to install FSL and Freesurfer as part of running Connectome Mapper. Freesurfer required changing the shell to tcsh in order to configure its folders. Now for FSL, I have to add to .profile the ...
1
vote
2answers
32 views

How to run .sh through terminal without using Nautilus Ubuntu 14.04 [duplicate]

I have an .sh file that looks like #!bin/bash exec /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/ java java -jar /home/me/myfolder/my.jar I've made this file executable and it works fine when in the ...
1
vote
1answer
22 views

How to write a script with nautilus actions?

I want to use nautilus actions with my own script which I have usually started successfully with open-terminal and pasting the command (s. below) directly in the terminal. for file in *.mp4; do mkdir ...
2
votes
3answers
68 views

How to differentiate command from the output using color

I have to differentiate command from the output using color like this $ cat file-name (this should be in some color say like red) some test in file OUTPUT (this output should be in some other color ...
3
votes
2answers
31 views

I think I deleted bash!

I am attempting to make a PXE server that will boot Ubuntu (live cd) 14.04. I was trying to copy the bash file from /bin/bash to /var/lib/tftpboot/Ubuntu/bin/bash I must have used the ...
0
votes
2answers
25 views

How to properly detach a command?

I have this little script I use to launch a root Nautilus window (yeah, dangerous, but sometimes necessary): #!/bin/bash gksudo --description "Launch a root Nautilus" -- sh -c "xdg-open / &" ...
1
vote
1answer
37 views

Undo apt-get remove --purge

I wanted a fresh install of Python and ran sudo apt-get remove --purge python. Apparently it has killed almost everything I had installed in my system. Looking at the history.log I guess I could ...
1
vote
3answers
33 views

Cannot find location of permanent aliases.

A couple of months ago, I made a few permanent aliases for my bash shell on Ubuntu 14.04. They are actively making my life easier, and I would like to add a couple more to the list, but I cannot find ...
3
votes
1answer
72 views

How to send an email using command line?

Here's what I have: cat UserReport.txt | mail -s "TestSubject" "nospam@gmail.com" It's a small file, much smaller than a picture so it should send almost instantly. Though I receive nothing. I ...
0
votes
1answer
31 views

How to run bootinfoscript from the GParted liveCD?

How to run bootinfoscript from the GParted live CD? Windows 7 on internal hard drive, and Linux on an external USB SSD drive (Linux not loaded).
9
votes
6answers
695 views

How to make the argument as optional in bash function?

In have this function with 9 arguments: SUM() { echo "The sum is $(($1+$2+$3+$4+$5+$6+$7+$8+$9))" } And I want to make the second arguments to the next(3..9) become a optional arguments. When ...
0
votes
0answers
13 views

bash script transition to Qt Ubuntu SDK [duplicate]

I've a script in bash that I would like to write in Ubuntu SDK QtEditor: sudo su echo $PASSWD sudo cp -rf ./Livewave-master ~/tmp/Livewave cd ~/Livewave sudo chmod +x update_XPTO.sh echo $PASSWD ...
-1
votes
1answer
35 views

Sourcing a file [on hold]

I am using ROS (Robot Operating System www.ros.org). I have to source .sh file every time. What it means ? source /opt/ros//setup.bash or have to enter this line in .bashrc file Why we need this ?
2
votes
4answers
73 views

making a bash script executable programatically

I need to create a bash script to create and mount a drive. So, two simple commands. Both "work" when entered at the command line. The script is created and executed every time a normal user logs in, ...
3
votes
3answers
207 views

Special variables in bash

I know these are few special variable used by bash. But I am not able to understand it. Can anyone explain me what are these variable and how to use it? $* $@ $#
0
votes
0answers
24 views

wait for job in bash script

find /var/www/ -ipath */logs/access.log.gz -execdir mv "{}" "old/`date +\%G-\%m-\%d`-access.log.gz" \; wait service nginx reload wait python /var/www/default/piwik/misc/log-analytics/import_logs.py ...
1
vote
1answer
33 views

Shell Script Problem

I decided to make a shell script for basic nmap scanning so I did it like this : #!/bin/bash sudo apt-get install nmap printf "enter the name of site to do basic scan on >>>" read NAME ...
1
vote
3answers
16 views

Wildcard: return source path

I'm trying to rename every access.log.gz file (note: exact filename, not "beginning with" or "containing") found in /home/*/logs to date-access.log.gz in the same folder. for file in ...
0
votes
2answers
44 views

Bash error on opening the terminal

Whenever I open terminal in Ubuntu I get the following bash and I don't know how to solve it. I need a solution as soon as possible: bash: ...
0
votes
1answer
38 views

“Syntax error: Unterminated quoted string”

I am trying to use a backup script that will backup my sql database and website files. I am running Ubuntu 12.04 32 bit version and zPanel. Here is what my DB structure is along with which DB I want ...
1
vote
1answer
59 views

Bash script for multiple tabs program running

I have the following bash script code to open multiple session of a python script with different input argument in different terminal tabs. #!/bin/bash cd /home/me/experiment tab=" ...
0
votes
0answers
20 views

Permission denied after compiling a fortran program [on hold]

After I compile a fortran code, it gives a non-executable program (only the mode rw, not x). When I run it says: bash ./program PERMISSION DENIED If I change mode chmod u+x program, then it will ...
2
votes
0answers
59 views

Shell command not asking for password inside while loop [on hold]

I am trying to run .sh file to put certificate via keytool command in every jre/lib/security/cacert file described in ~/.java/deployment/deployment.properties file. #!/bin/bash ...
-1
votes
0answers
11 views

i forgot Admin pass on my Think Pad and Nothing is Helping me! [duplicate]

I am in the GNU GRUB now. I see 4 options Ubuntu, Advanced options for Ubuntu, Memory test, memory test with a bunch of numbers after it. I found out how to finally get in to recovery mode after ...
2
votes
1answer
22 views

Bash script that opens multiple netcat instances and exits them

I am trying to create a script that opens up multiple gnome-terminals and opens a netcat connection. After a couple seconds I would like the terminals to close. I am at a loss and I believe it can't ...
0
votes
1answer
23 views

combine multible commands in one run one of them is find

I want in one line a command to use find to get a file name from a txt file , search for it , and play it then after closing the video I need to run a certain script I managed the first part but ...
1
vote
1answer
33 views

Why won't this php script execute bash script?

Why am I not able to execute this bash script using php? I have tried exec() as well as shell_exec(). index.php <?php $old = getcwd(); echo $old; chdir($old); $message=exec("a.sh"); ...
0
votes
2answers
22 views

gnome-terminal profile without bash history

I'm trying to create a profile in gnome-terminal that doesn't store bash history. The easiest way to do that is to run export HISTIGNORE="*", but there is one problem, gome-terminal is executing ...
1
vote
2answers
306 views

Why isn't one 'bash' command working at startup

I am working on a VM with Lubuntu 14.04, I have created a script a.sh, #!bin/bash echo "aaaa" >> a.txt And my /etc/rc.local file is as follows: #!/bin/sh -e # # rc.local # # This script is ...
-2
votes
4answers
96 views

How to arrange this file properly?

I'd prefer to edit TestFile in place to get the desired output. How could I do this? This is a work box so I'd prefer to not have to install additional packages. TestFile: randomcollege-nt\jsmith90 ...
1
vote
3answers
61 views

How to kill a script running in terminal, without closing terminal (Ctrl + C doesn't work)?

I have written a bash script that calls several other programs and executes a bunch of commands. I run this script from the terminal. Now I want to kill the script. Pressing Ctrl + C sometimes ...
-1
votes
1answer
46 views

Run pkill without sudo permission

I want to run pkill like below. sudo pkill -u 11002 I cannot give sudo password multiple times, so I want to run pkill without sudo user. For this i copied pkill to home as named bkill, and then i ...
0
votes
1answer
41 views

Script that ssh to remote host enters pass and executes a command?

Is it possible to make a script that ssh to remote host, enters the passwords to log-in and then executes at least 1 command on the remote machine?
1
vote
1answer
54 views

Question about something appearing in my Terminal

After I moved from Windows to Ubuntu I liked to try out every new app I found so I decided to install Betty (a Siri like alternative for Ubuntu). I used the PPA given by Webupd8 site and the last ...
-1
votes
0answers
10 views

vncserver prompts for password every time

I am a Linux noob, and I am performing some tasks for the very first time. I have a bash script that uses vncserver (so i would prefer to stay with vncserver). The script used to work properly when ...
0
votes
0answers
31 views
+100

Prevent *buntu from updating dictionaries during install

In utilizing Vagrant to install an Ubuntu server box with a GUI (lxde), the shell provisioning fails due to what seems to be a frequent issue when setting up dictionaries. The resolutions seem to all ...
1
vote
0answers
27 views

xdotool for writing a preformated command in bash [closed]

when I run prompt$ xdotool type 'find -iname "**"' I get this find -iname "**"prompt$ find -iname "**" how could I have that prompt$ find -iname "**" I use xdotool to fill the command line ...
0
votes
1answer
18 views

is source code for bash sufficient, when I want source code of ext4?

when I want to know the source code of ext4-filesystem (mkfs.ext4) - is it then sufficient to download the source code for bash ? - or do I need else source-codes after I did : sudo apt-get ...
0
votes
1answer
14 views

awk: runaway regular expression

I can run command on ubuntu: free | grep Mem | awk '{print $3/$2 * 100.0}' And get result: 20.1092 But when I try to put it in alias: alias memTotal="free | grep Mem | awk '{print $3/$2 * ...
0
votes
1answer
20 views

Paging standard out using 'more', and piping to syslog

I've implemented a wrapper script which causes all commands executed via this wrapper script to log (via rsyslog) things such as the execution time, the user that ran the command, and the exit code. ...
0
votes
2answers
37 views

Bash tries to run python on unknown command and fails in Py_Initialize

Running Ubuntu 14.04 and updater says that all software is up to date. Have tried rebooting. I am preparing for a class that uses Python. I have installed it and it works fine. However, I now have ...
0
votes
1answer
29 views

Getting “no such file or directory” bash error when trying to compile a file

I have already checked out the many similar questions on this website, but I keep getting this error when trying to run my program conversion.cpp with ./conversion. The program is here: (i can't ...
1
vote
2answers
41 views

.desktop file doesn't execute a script, works fine when run by hand

I am having problems with my .desktop files. I have a shell script that constantly watches for a file to be put into the "Downloads" folder. When a file is put into the folder it automatically ...
0
votes
0answers
37 views

How to run correctly bash script from another script?

I want to run sqldeveloper on Ubuntu Gnome 14.04. I created some symbolic link and tried to call from one script file another. And it fail with message: /usr/local/bin/sqldeveloper: line 2: ...
0
votes
0answers
47 views

Get file created by a program launched by a bash script

I have the next scripts: | base_dir/ | - test.sh | | tests/ | | - elaborato.sh test.sh run elaborato.sh elaborato.sh could create a file (not always it create a file). I need : to know the ...