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

learn more… | top users | synonyms (1)

0
votes
1answer
21 views

ctrl + r not picking up the latest commands in history

when I enterl ctrl + r and enter a search term it goes back in distant history and never finds the commands that I most recently typed that has this keyword
0
votes
0answers
36 views

Errors logs for MAAS commissioning?

I am trying to get some things to work with MAAS. I have hits some brick walls (hard!!), but in the end you will learn right ;) So what I want to do is to make MAAS start the machine with etherwake. ...
0
votes
1answer
47 views

Permission to my ~/.bashrc denied

I have an issue with accessing my ~/.bashrc file. I did and obtained the following: yuve@YuveSys:~$ ~/.bashrc -bash: /home/yuve/.bashrc: Permission denied yuve@YuveSys:~$ sudo su root@YuveSys:/home/...
0
votes
2answers
23 views

variable expansion in single quote

I have have string in single quotes. Inside which I want to insert a variable and expand it. I know in bash variable expansion works with double quotes only. But I'm still not able to make it work. e....
1
vote
1answer
104 views

Problems with Ubuntu via Crouton on Chromebook

I have a few problems and questions. First of all I am using a brandnew Chromebook Acer R11 and used this guide to install Ubuntu next to Chrome OS: http://chromebookblog.de/ubuntu-auf-dem-chromebook-...
0
votes
2answers
69 views

bash script to run a second command with select output from first command as variable

I'd like to get the output of the second command with the 7 character PSI domain (00:01.0) as a variable. How can I write a bash script to do this? jeff@jeff-probook:/$ lspci | grep VGA 00:01.0 ...
3
votes
2answers
210 views

Invalid bash variable assignment

I have two scripts namely variables.sh and install.sh. When I execute bash install.sh, the .config file is not properly created. The export CC line doesn't adds BUILD64 variable entry into it and ...
0
votes
0answers
137 views

Need script to logout after 20 minute idle time and then auto login

I have a public internet terminal at my workplace. Often, users will simply walk away from the machine without logging out (of email, facebook, etc.) -- I want to make the end-user experience more ...
0
votes
3answers
31 views

Can't use --help with printf

Most programs print usage and quit with "--help". But I can't get it to work with printf: $ printf --help bash: printf: --: invalid option printf: usage: printf [-v var] format [arguments] man 1 ...
0
votes
0answers
10 views

What is the meaning of the highlighting in the terminal? [duplicate]

I use ubuntu for about half a year, but I'm still a newbie regarding the terminal. So could someone explain me what the exact meaning of the highlightings in the terminal is? I only know the ...
1
vote
1answer
22 views

Start script to launch repeating child scripts?

I'm trying to get this looping script to run at boot. If I add '#! /bin/bash", I can start it automatically from profile startup but then I can't get the child windows to behave properly. - What am I ...
0
votes
0answers
39 views

Executing commands in an elevated bash process by writing to the standard input of its parent process

I have a simple bash script 'bash.sh' that starts another bash instance using pkexec. #!/bin/bash bash -c 'pkexec bash' When executed this shows a prompt for the user to enter their password. The ...
0
votes
1answer
25 views

Difference between bash-shell and ksh-shell by using while with read - what can I do in bash for the same response as in ksh?

I have two scripts: in bash #!/bin/bash H_VARIABLE=empty echo "Zeile1 Zeile2" | while read satz do H_VARIABLE="$H_VARIABLE $satz" done echo H_VARIABLE=$H_VARIABLE Result: H_VARIABLE=...
0
votes
0answers
24 views

(standard_in) 1: parse error with comparing decimals

I keep getting a parse error and have tried to check the code but I can't see what could be wrong? #!/bin/bash echo -n "Please enter first: " read first echo -n "Please enter second: " read second ...
0
votes
0answers
28 views

bash: [file]: No such file or directory

I have access to a cluster with six machines (wien0, wien1,..wien6) with /home/yhattori directory shared. I've installed a program (gaussian03) in wien6 machine at /home/yhattori/g03 directory where ...
0
votes
0answers
26 views

Edit /etc/environment via Command Line [duplicate]

I am using Ubuntu Server 14.04 and I would like to be able to edit the /etc/environment file via the command line to append the file with environment variables. This append operation is going inside ...
1
vote
1answer
39 views

Recursive Scan To Move All Files And Deleting Empty Directories

I am learning bash scripting and want to move all *.ort files to a new directory and delete the directory once the .ort file is moved. To Note: I do not need to keep same structure - I want to move ...
1
vote
1answer
24 views

Script Appends Extension Twice

I am running a quick bash script that will convert any .mov files to .mp4. This works great 99% of the time, but sometimes I hit a snare and I get an error of: the file /home/jgeoffrey/Documents/...
0
votes
1answer
26 views

Remove note about bash that appears when opening the terminal

I tried instaling ROOT by CERN by following steps described by certain people. But although that was unsuccessful, I keep getting the following line when I open a new terminal. bash: /home/USER/bin/...
0
votes
1answer
28 views

My bash script doesn't work when triggered by crontab, but works when i trigger it manually?

this is the cron entry */1 * * * * ./home/usr/automation/check_rejected_files.sh > /home/usr/automation/cronout it produce the file but nothing else happen, i added a date log in the beginning ...
2
votes
1answer
388 views

Bash 12 - 08 Value too great for base (error token “08”)

So, I'm trying to calculate 12-08 (not 12-8) and get the following error: let: 08: value too great for base (error token is "08") Here's the sample code: first=12 second=08 if [[ ($first > $...
3
votes
2answers
71 views

Prompt overwrite file in echo

I am writing to a file using simple echo (I'm open to using other methods). When writing to a file that already exists, can I make echo prompt the user to overwrite or not? For eg, maybe an argument ...
0
votes
1answer
26 views

trouble creating directory backups of selected directories

I have to a create directory backups of selected directories; each backup should have only one root directory; if multiple directories are selected, then each of them should be stored in a separate ...
0
votes
0answers
35 views

How to stop x11vnc from shutting down when I log out?

At boot I have sudo x11vnc -xkb -noxrecord -forever -noxfixes -noxdamage -display :0 -auth /var/run/lightdm/root/:0 -usepw run via init.d It works and shows me the login prompt when I use a VNC ...
-1
votes
1answer
113 views

How can I open multiple html files with gedit from a script?

I have a list of HTML files I use for writing. I would like to script to open them for editing. HTML files are associated with Firefox as the Default Application on my system. New to Linux and ...
0
votes
1answer
39 views

vlc and launcher

I tried to add an entry to the contextual menu of the ubuntu launcher to be able to start .part files in the download folder. This is how it looks like: [Desktop Entry] Version=1.0 Name=VLC media ...
-1
votes
1answer
57 views

Help with “grep” command in terminal [closed]

I ran a command on a terminal in Ubuntu: $ grep "Director" file.lst And the output of that command was 1006|Pankaj | Director|sales|03/09/38|6700 I want know the full description of the output ...
2
votes
2answers
95 views

Why does sudo require a password the second time in a bash script every time? [duplicate]

I have a simple very tiny web app, and wanted to make my life a bit easier by having a very simplistic deployment script, that does the following: Pull updates from git Run composer Change owner of ...
0
votes
1answer
32 views

Script to send Email if Log grows past 90M

I have the Below Script to check the size of my Log file. Should it grow to beyond 84M to should be renamed with the current date and a a new one is automatically generated by my APP. However it ...
5
votes
1answer
70 views

need help creating an if statment that will work for my purpose in .bashrc

I have edited my .bashrc to look like this with some help from others on this forum ... Thanks guys for the help on the weather segment of this script... An issue I have ran into is the code for the ...
-3
votes
1answer
42 views

Scripting a script that tests a shell [closed]

I have a custom shell and want to test its arithmetic function. I wrote a script to test it and it performs the arithmetic but it is also trying to execute the result as a program. printf "******...
0
votes
0answers
17 views

Can't run rdesktop from desktop launcher

I have a problem with running rdesktop from .desktop launcher #!/bin/bash [Desktop Entry] Type=Application Terminal=true Name=11.11.11.11 Icon=utilities-terminal Exec=rdesktop 11.11.11.11 -u ...
0
votes
0answers
33 views

Ccrontab script returns empty output

I'm writing a simple bash script for analysing disk health status with smartctl and when i run it in a terminal or by script all works fine: for i in {0..5}; do echo "***** /dev/sda$i *****"; ...
0
votes
1answer
21 views

Variable is taking value as a file instead of text (String)

I'm trying to make a bash script in which I manipulate a download link with user input dates and such to then download the file. When I run it, it throws an error Final.sh: Line 16: http://real-...
0
votes
3answers
160 views

How can I run a shell script from bashrc file?

What I basically want to achieve is to type in a custom command in the terminal and a specific shell script should run each time. I could achieve the above requirement with folders,by modifying the ...
4
votes
1answer
40 views

Using binfmt-misc in conjunction with xattrs

I currently use a piece of sandboxing software on my 14.04 machine that isolates Linux binaries from one another (Using a special type of namespace isolation different than AppArmor) Currently, the ...
1
vote
1answer
25 views

Grub C Code in “set” output?

i made an interesting discovery. When i run set as root the output displays some c code... it seems like some grub boot-loader code.. followed by some unreadable parts. That seems a bit ... wired to ...
0
votes
0answers
35 views

Cron script runs but dpkg command fails

I have a cron script that updates a package with dpkg. This is an oversimplified version of a much larger script. But this is the part that is not working. I copy the update cron script to /etc/...
3
votes
2answers
35 views

How to read symbol separated strings from a variable, convert to numbers, and perform arithmetic?

In a bash script, I wish to pass in a string which is contained in a variable, and contains up to 3 substrings separated by the '+' symbol. Each substring will have a specific numeric value, sort of ...
1
vote
1answer
34 views

Add a delay to a keyboard shortcut

To put my screens on standby, I've defined a keyboard shortcut: xset dpms force standby This causes the screens to go into standby mode immediately. However, I'd like the computer to wait for 2 ...
4
votes
1answer
69 views

Bash prepends the symbol '@' to $PS1. How do I get rid of it?

I'm running Ubuntu 16.04 and bash keeps putting '@' in front of my prompt, regardless of the value set in ~/.bashrc. I've tried setting different values both in the ~/.bashrc file and from within the ...
2
votes
3answers
28 views

mv a folder and now the folder seems gone

I typed the following: mv /var/www/folder/ ../../ Now I can't find that folder or anything that was inside of it. What am I missing? /var looks like this: root@,my-server:/var# ls -la total 52 ...
0
votes
1answer
40 views

How to check computer's timezone through Terminal? [duplicate]

I am writing a bash script which at some point needs to determine a user's timezone, so how exactly can I check the timezone in Terminal? I would like to be able to get output in terms of GMT and UTC. ...
2
votes
3answers
296 views

Cyclic script execution

How to make the cyclic execution of the script? At the end of the script i need to run it again. Cron is not suitable, because i need to run the script immediately after the previous
0
votes
1answer
387 views

-gt: unary operator expected shell script

Getting this error after the upgrade packages in ubuntu. #!/bin/bash used=$(df -H | grep 'rootfs' | cut -d "G" -f 4 | cut -d "%" -f 1) limit=90 if [ $used -gt $limit ]; then Or [ "$used" -gt "$limit"...
1
vote
1answer
31 views

Hot Corners Musical Sequence Command Script

I am writing a script which uses hot corners to play specific musical notes when hovering in corners, and depending on the musical sequence to execute a specific command. The script is called with ...
2
votes
1answer
30 views

How to set up bash autocompletion to deal with file names like “./foo=bar/x=y.txt”?

When I start typing a file name that contains an equal sign, autocompletion with [tab] shows a strange behaviour: ls ./foo[tab] # autocompletion to "./foo\=bar" <- ok ls ./foo=[tab] # ...
0
votes
1answer
46 views

Is there any advantage to Rsync moving files on the same machine?

I was reading how to install Magento on Digital Ocean Ubuntu 14.04 VPS. All files are on the server. the author says: We will use rsync to transfer our Magento files there, since rsync will ...
0
votes
1answer
29 views

Bash script syntax

I want to create a .sh script which will execute a python file called match_scraper.py, update a psql db as shown, call a scrapy spider to execute. When I create the .sh script how do I call ...
3
votes
2answers
70 views

Shell script password with special chars

I've build a shell mysql backup script which works very well. It only has problems with passwords with special chars like this: xgT{uic[Is?uJ+. Here is the important part of the script: #!/bin/sh ...